How to support SignedKey and SigningMethod according to different ClientID in an OAuth2 server?
zlgale opened this issue · 0 comments
zlgale commented
For example, the SigningMethod of the token of client1 is RS256, and the token of client2 is HS256. What should I do in this case?
mgr.MapAccessGenerate(generates.NewJWTAccessGenerate("", []byte(config.Get().OAuth2.JWTSignedKey), jwt.SigningMethodHS512))
clientStore := store.NewClientStore()
for _, v := range config.Get().OAuth2.Client {
clientStore.Set(v.ID, &models.Client{
ID: v.ID,
Secret: v.Secret,
Domain: v.Domain,
})
}
mgr.MapClientStorage(clientStore)