Class ScopeAuthorization
java.lang.Object
io.vertx.reactivex.ext.auth.oauth2.authorization.ScopeAuthorization
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate, AuthorizationProvider
public class ScopeAuthorization
extends Object
implements io.vertx.lang.rx.RxDelegate, AuthorizationProvider
Scope is a mechanism in OAuth 2.0 to limit an application's access to a user's account.
An application can request one or more scopes, this information is then presented to the
user in the consent screen, and the access token issued to the application will be
limited to the scopes granted.
The OAuth spec allows the authorization server or user to modify the scopes granted to the application compared to what is requested, although there are not many examples of services doing this in practice.
OAuth2 does not define any particular values for scopes, since it is highly dependent on the service's internal architecture and needs.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScopeAuthorization(ScopeAuthorization delegate) ScopeAuthorization(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionclaimKey()Returns the configured claim key.static ScopeAuthorizationcreate()Factory method to create a Authorization provider for Oauth 2.0 scopes using the default separator" ".static ScopeAuthorizationFactory method to create a Authorization provider for Oauth 2.0 scopes.static ScopeAuthorizationFactory method to create a Authorization provider for OpenID Connect scopes.Returns a String with the given scopes concatenated with the given separator.booleangetAuthorizations(User user) Updates the user with the set of authorizations.getId()returns the id of the authorization providerinthashCode()static ScopeAuthorizationrxGetAuthorizations(User user) Updates the user with the set of authorizations.Returns the configured separator.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ScopeAuthorization
-
ScopeAuthorization
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceAuthorizationProvider- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
getId
returns the id of the authorization provider- Specified by:
getIdin interfaceAuthorizationProvider- Returns:
-
getAuthorizations
Updates the user with the set of authorizations.- Specified by:
getAuthorizationsin interfaceAuthorizationProvider- Parameters:
user- user to lookup and update.- Returns:
- Future void to signal end of asynchronous call.
-
rxGetAuthorizations
Updates the user with the set of authorizations.- Specified by:
rxGetAuthorizationsin interfaceAuthorizationProvider- Parameters:
user- user to lookup and update.- Returns:
- Future void to signal end of asynchronous call.
-
create
Factory method to create a Authorization provider for Oauth 2.0 scopes using the default separator" ".- Returns:
- a AuthorizationProvider
-
create
Factory method to create a Authorization provider for Oauth 2.0 scopes.- Parameters:
scopeSeparator- the scope separator e.g.:" ",",","+"- Returns:
- a AuthorizationProvider
-
create
Factory method to create a Authorization provider for OpenID Connect scopes. The claim key will be used to locate the scopes from a decoded JWT.- Parameters:
scopeSeparator- the scope separator e.g.:" ",",","+"claimKey- the scope claim key e.g.:"scp","scope"- Returns:
- a AuthorizationProvider
-
separator
-
claimKey
-
encode
-
newInstance
-