Package io.vertx.mutiny.ext.web.handler
Class OAuth2AuthHandler
- java.lang.Object
-
- io.vertx.mutiny.ext.web.handler.OAuth2AuthHandler
-
- All Implemented Interfaces:
io.vertx.core.Handler<RoutingContext>
,AuthenticationHandler
,Consumer<RoutingContext>
public class OAuth2AuthHandler extends Object implements AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<OAuth2AuthHandler>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description OAuth2AuthHandler(io.vertx.ext.web.handler.OAuth2AuthHandler delegate)
OAuth2AuthHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(RoutingContext item)
static OAuth2AuthHandler
create(Vertx vertx, OAuth2Auth authProvider)
static OAuth2AuthHandler
create(Vertx vertx, OAuth2Auth authProvider, String callbackURL)
boolean
equals(Object o)
OAuth2AuthHandler
extraParams(io.vertx.core.json.JsonObject extraParams)
io.vertx.ext.web.handler.OAuth2AuthHandler
getDelegate()
void
handle(RoutingContext arg0)
int
hashCode()
static OAuth2AuthHandler
newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler arg)
OAuth2AuthHandler
pkceVerifierLength(int length)
OAuth2AuthHandler
prompt(String prompt)
OAuth2AuthHandler
setupCallback(Route route)
String
toString()
OAuth2AuthHandler
withScope(String scope)
OAuth2AuthHandler
withScopes(List<String> scopes)
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<OAuth2AuthHandler> __TYPE_ARG
-
-
Constructor Detail
-
OAuth2AuthHandler
public OAuth2AuthHandler(io.vertx.ext.web.handler.OAuth2AuthHandler delegate)
-
OAuth2AuthHandler
public OAuth2AuthHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.handler.OAuth2AuthHandler getDelegate()
- Specified by:
getDelegate
in interfaceAuthenticationHandler
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handle
in interfaceAuthenticationHandler
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
-
create
public static OAuth2AuthHandler create(Vertx vertx, OAuth2Auth authProvider, String callbackURL)
- Parameters:
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`- Returns:
- the auth handler
-
create
public static OAuth2AuthHandler create(Vertx vertx, OAuth2Auth authProvider)
- Parameters:
vertx
- the vertx instanceauthProvider
- the auth provider to use- Returns:
- the auth handler
-
extraParams
public OAuth2AuthHandler extraParams(io.vertx.core.json.JsonObject extraParams)
- Parameters:
extraParams
- extra optional parameters.- Returns:
- self
-
withScope
public OAuth2AuthHandler withScope(String scope)
- Parameters:
scope
- scope.- Returns:
- new instance of this interface.
-
withScopes
public OAuth2AuthHandler withScopes(List<String> scopes)
- Parameters:
scopes
- scopes.- Returns:
- new instance of this interface.
-
prompt
public OAuth2AuthHandler prompt(String prompt)
- Parameters:
prompt
- the prompt choice.- Returns:
- self
-
pkceVerifierLength
public OAuth2AuthHandler pkceVerifierLength(int length)
- Parameters:
length
- A number between 43 and 128. Or -1 to disable.- Returns:
- self
-
setupCallback
public OAuth2AuthHandler setupCallback(Route route)
- Parameters:
route
- a given route e.g.: `/callback`- Returns:
- self
-
accept
public void accept(RoutingContext item)
- Specified by:
accept
in interfaceAuthenticationHandler
- Specified by:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
public static OAuth2AuthHandler newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler arg)
-
-