vertx / io.vertx.ext.auth.oauth2 / OAuth2Auth

# OAuth2Auth

`interface OAuth2Auth : AuthProviderInternal`

Factory interface for creating OAuth2 based io.vertx.ext.auth.AuthProvider instances.

Author
Paulo Lopes

### Functions

authorizeURL | `abstract fun authorizeURL(params: JsonObject): String` Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
create | `open static fun create(vertx: Vertx, flow: OAuth2FlowType, config: OAuth2ClientOptions): OAuth2Auth` `open static fun create(vertx: Vertx, flow: OAuth2FlowType): OAuth2Auth` Create a OAuth2 auth provider
decodeToken | `abstract fun decodeToken(token: String, handler: Handler<AsyncResult<AccessToken>>): OAuth2Auth` Decode a token to a AccessToken object. This is useful to handle bearer JWT tokens.
getFlowType | `abstract fun getFlowType(): OAuth2FlowType` Returns the configured flow type for the Oauth2 provider.
getScopeSeparator | `abstract fun getScopeSeparator(): String` Returns the scope separator. The RFC 6749 states that a scope is expressed as a set of case-sensitive and space-delimited strings, however vendors tend not to agree on this and we see the following cases being used: space, plus sign, comma.
hasJWTToken | `abstract fun hasJWTToken(): Boolean` Returns true if this provider supports JWT tokens as the access_token. This is typically true if the provider implements the `openid-connect` protocol. This is a plain return from the config option jwtToken, which is false by default. This information is important to validate grants. Since pure OAuth2 should be used for authorization and when a token is requested all grants should be declared, in case of openid-connect this is not true. OpenId will issue a token and all grants will be encoded on the token itself so the requester does not need to list the required grants.
introspectToken | `open fun introspectToken(token: String, handler: Handler<AsyncResult<AccessToken>>): OAuth2Auth` `abstract fun introspectToken(token: String, tokenType: String, handler: Handler<AsyncResult<AccessToken>>): OAuth2Auth` Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
loadJWK | `abstract fun loadJWK(handler: Handler<AsyncResult<Void>>): OAuth2Auth` Loads a JWK Set from the remote provider. When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
verifyIsUsingPassword | `open fun verifyIsUsingPassword(): Unit`