Package com.atlassian.oauth2.scopes.api
Interface ScopeResolver
public interface ScopeResolver
A product-agnostic service for obtaining
Scope objects by name.-
Method Summary
Modifier and TypeMethodDescriptionGets the set of scopes for this productWill try to get the scope from the name.booleanhasScopePermission(Scope tokenScope, Scope configScope) Will check if the tokenScope has permission against the configScope If the tokenScope is higher than the configScope then this will return false
-
Method Details
-
getScope
Will try to get the scope from the name.- Parameters:
scopeName- the scope name to match- Returns:
- The scope that matches the scopeName
- Throws:
InvalidScopeException- if fails to find the scope- See Also:
-
hasScopePermission
Will check if the tokenScope has permission against the configScope If the tokenScope is higher than the configScope then this will return false- Parameters:
tokenScope- the scope to checkconfigScope- the scope to check against- Returns:
- true if tokenScope is within configScope, false otherwise
-
getAvailableScopes
Gets the set of scopes for this product- Returns:
- the set of scopes for this product
-