public class OAuth2AuthHandler extends Object implements AuthenticationHandler, Handler<RoutingContext>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<OAuth2AuthHandler> |
__TYPE_ARG |
Constructor and Description |
---|
OAuth2AuthHandler(OAuth2AuthHandler delegate) |
OAuth2AuthHandler(Object delegate) |
Modifier and Type | Method and Description |
---|---|
String |
authenticateHeader(RoutingContext context)
Returns
|
static OAuth2AuthHandler |
create(Vertx vertx,
OAuth2Auth authProvider)
Create a OAuth2 auth handler without host pinning.
|
static OAuth2AuthHandler |
create(Vertx vertx,
OAuth2Auth authProvider,
String callbackURL)
Create a OAuth2 auth handler with host pinning
|
boolean |
equals(Object o) |
OAuth2AuthHandler |
extraParams(JsonObject extraParams)
Extra parameters needed to be passed while requesting a token.
|
OAuth2AuthHandler |
getDelegate() |
void |
handle(RoutingContext event)
Something has happened, so handle it.
|
int |
hashCode() |
static OAuth2AuthHandler |
newInstance(OAuth2AuthHandler arg) |
void |
parseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject.
|
void |
parseCredentials(RoutingContext context,
Handler<AsyncResult<Credentials>> handler)
Parses the credentials from the request into a JsonObject.
|
OAuth2AuthHandler |
pkceVerifierLength(int length)
PKCE (RFC 7636) is an extension to the Authorization Code flow to prevent several attacks and to be able to
securely perform the OAuth exchange from public clients.
|
void |
postAuthentication(RoutingContext ctx)
This method is called to perform any post authentication tasks, such as redirects.
|
OAuth2AuthHandler |
prompt(String prompt)
Indicates the type of user interaction that is required.
|
Single<Credentials> |
rxParseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject.
|
OAuth2AuthHandler |
setupCallback(Route route)
add the callback handler to a given route.
|
String |
toString() |
OAuth2AuthHandler |
withScope(String scope)
scopes to be requested while requesting a token.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<OAuth2AuthHandler> __TYPE_ARG
public OAuth2AuthHandler(OAuth2AuthHandler delegate)
public OAuth2AuthHandler(Object delegate)
public OAuth2AuthHandler getDelegate()
getDelegate
in interface AuthenticationHandler
public void handle(RoutingContext event)
handle
in interface Handler<RoutingContext>
handle
in interface AuthenticationHandler
event
- the event to handlepublic String authenticateHeader(RoutingContext context)
authenticateHeader
in interface AuthenticationHandler
context
- public void postAuthentication(RoutingContext ctx)
postAuthentication
in interface AuthenticationHandler
ctx
- the routing contextpublic static OAuth2AuthHandler create(Vertx vertx, OAuth2Auth authProvider, String callbackURL)
vertx
- the vertx instanceauthProvider
- the auth provider to usecallbackURL
- the callback URL you entered in your provider admin console, usually it should be something like: `https://myserver:8888/callback`public static OAuth2AuthHandler create(Vertx vertx, OAuth2Auth authProvider)
vertx
- the vertx instanceauthProvider
- the auth provider to usepublic OAuth2AuthHandler extraParams(JsonObject extraParams)
extraParams
- extra optional parameters.public OAuth2AuthHandler withScope(String scope)
scope
- scope.public OAuth2AuthHandler prompt(String prompt)
prompt
- the prompt choice.public OAuth2AuthHandler pkceVerifierLength(int length)
length
- A number between 43 and 128. Or -1 to disable.public OAuth2AuthHandler setupCallback(Route route)
route
- a given route e.g.: `/callback`public void parseCredentials(RoutingContext context, Handler<AsyncResult<Credentials>> handler)
context
- the routing contexthandler
- the handler to be called once the information is available.public void parseCredentials(RoutingContext context)
context
- the routing contextpublic Single<Credentials> rxParseCredentials(RoutingContext context)
context
- the routing contextpublic static OAuth2AuthHandler newInstance(OAuth2AuthHandler arg)
Copyright © 2021 Eclipse. All rights reserved.