fix: restrict additional scopes

This commit is contained in:
Fabiennne 2020-10-28 15:08:22 +01:00
parent e13f3a0f46
commit 6ba72be7ea
5 changed files with 53 additions and 45 deletions

View file

@ -171,11 +171,15 @@ func (c *ConfClient) DevMode() bool {
func (c *ConfClient) AllowedScopes() []string {
return nil
}
func (c *ConfClient) AssertAdditionalIdTokenScopes() bool {
return false
func (c *ConfClient) RestrictAdditionalIdTokenScopes() func(scopes []string) []string {
return func(scopes []string) []string {
return scopes
}
}
func (c *ConfClient) AssertAdditionalAccessTokenScopes() bool {
return false
func (c *ConfClient) RestrictAdditionalAccessTokenScopes() func(scopes []string) []string {
return func(scopes []string) []string {
return scopes
}
}
func (c *ConfClient) IsScopeAllowed(scope string) bool {
return false