mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
fix: refresh token activation (#1795)
* fix: oidc grant type check * docs: add offline_access scope * docs: update refresh token status in supported grant types * fix: update oidc pkg
This commit is contained in:
@@ -61,6 +61,10 @@ func (c *Client) ResponseTypes() []oidc.ResponseType {
|
||||
return responseTypesToOIDC(c.OIDCResponseTypes)
|
||||
}
|
||||
|
||||
func (c *Client) GrantTypes() []oidc.GrantType {
|
||||
return grantTypesToOIDC(c.OIDCGrantTypes)
|
||||
}
|
||||
|
||||
func (c *Client) DevMode() bool {
|
||||
return c.ApplicationView.DevMode
|
||||
}
|
||||
@@ -165,6 +169,27 @@ func responseTypeToOIDC(responseType model.OIDCResponseType) oidc.ResponseType {
|
||||
}
|
||||
}
|
||||
|
||||
func grantTypesToOIDC(grantTypes []model.OIDCGrantType) []oidc.GrantType {
|
||||
oidcTypes := make([]oidc.GrantType, len(grantTypes))
|
||||
for i, t := range grantTypes {
|
||||
oidcTypes[i] = grantTypeToOIDC(t)
|
||||
}
|
||||
return oidcTypes
|
||||
}
|
||||
|
||||
func grantTypeToOIDC(grantType model.OIDCGrantType) oidc.GrantType {
|
||||
switch grantType {
|
||||
case model.OIDCGrantTypeAuthorizationCode:
|
||||
return oidc.GrantTypeCode
|
||||
case model.OIDCGrantTypeImplicit:
|
||||
return oidc.GrantTypeImplicit
|
||||
case model.OIDCGrantTypeRefreshToken:
|
||||
return oidc.GrantTypeRefreshToken
|
||||
default:
|
||||
return oidc.GrantTypeCode
|
||||
}
|
||||
}
|
||||
|
||||
func removeScopeWithPrefix(scopes []string, scopePrefix ...string) []string {
|
||||
newScopeList := make([]string, 0)
|
||||
for _, scope := range scopes {
|
||||
|
Reference in New Issue
Block a user