class OAuth2Auth extends AuthProvider
Factory interface for creating OAuth2 based io.vertx.scala.ext.auth.AuthProvider instances.
- Alphabetic
- By Inheritance
- OAuth2Auth
- AuthProvider
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new OAuth2Auth(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asJava: AnyRef
- Definition Classes
- AuthProvider
-
def
authenticate(authInfo: JsonObject, resultHandler: Handler[AsyncResult[User]]): Unit
- Definition Classes
- AuthProvider
-
def
authenticateFuture(authInfo: JsonObject): Future[User]
- Definition Classes
- AuthProvider
-
def
authorizeURL(params: JsonObject): String
Generate a redirect URL to the authN/Z backend.
Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
decodeToken(token: String, handler: Handler[AsyncResult[AccessToken]]): OAuth2Auth
Decode a token to a io.vertx.scala.ext.auth.oauth2.AccessToken object.
Decode a token to a io.vertx.scala.ext.auth.oauth2.AccessToken object. This is useful to handle bearer JWT tokens. * @param token the access token (base64 string)
- handler
A handler to receive the event
- returns
self
-
def
decodeTokenFuture(token: String): Future[AccessToken]
Like decodeToken but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getFlowType(): OAuth2FlowType
Returns the configured flow type for the Oauth2 provider.
Returns the configured flow type for the Oauth2 provider. * @return the flow type.
-
def
getScopeSeparator(): String
Returns the scope separator.
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. * @return what value was used in the configuration of the object, falling back to the default value which is a space.
-
def
getToken(params: JsonObject, handler: Handler[AsyncResult[AccessToken]]): Unit
Returns the Access Token object.
Returns the Access Token object. * @param params - JSON with the options, each flow requires different options.
- handler
- The handler returning the results.
-
def
getTokenFuture(params: JsonObject): Future[AccessToken]
Like getToken but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
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.
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. * @param token the access token (base64 string)
- tokenType
hint to the token type e.g.:
access_token
- handler
A handler to receive the event
- returns
self
-
def
introspectToken(token: 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.
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. * @param token the access token (base64 string)
- handler
A handler to receive the event
- returns
self
-
def
introspectTokenFuture(token: String, tokenType: String): Future[AccessToken]
Like introspectToken but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
introspectTokenFuture(token: String): Future[AccessToken]
Like introspectToken but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
loadJWK(handler: Handler[AsyncResult[Unit]]): OAuth2Auth
Loads a JWK Set from the remote provider.
Loads a JWK Set from the remote provider.
When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
-
def
loadJWKFuture(): Future[Unit]
Like loadJWK but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
missingKeyHandler(handler: Handler[String]): OAuth2Auth
Handled to be called when a key (mentioned on a JWT) is missing from the current config.
Handled to be called when a key (mentioned on a JWT) is missing from the current config. Users are advised to call io.vertx.scala.ext.auth.oauth2.OAuth2Auth#loadJWK but being careful to implement some rate limiting function.
This method isn't generic for several reasons. The provider is not aware of the capabilities of the backend IdP in terms of max allowed API calls. Some validation could be done at the key id, which only the end user is aware of. * @return Future result.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def rbacHandler(rbac: OAuth2RBAC): OAuth2Auth
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )