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 theoriginalnon 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 voidaccept(RoutingContext item)static OAuth2AuthHandlercreate(Vertx vertx, OAuth2Auth authProvider)static OAuth2AuthHandlercreate(Vertx vertx, OAuth2Auth authProvider, String callbackURL)booleanequals(Object o)OAuth2AuthHandlerextraParams(io.vertx.core.json.JsonObject extraParams)io.vertx.ext.web.handler.OAuth2AuthHandlergetDelegate()voidhandle(RoutingContext arg0)inthashCode()static OAuth2AuthHandlernewInstance(io.vertx.ext.web.handler.OAuth2AuthHandler arg)OAuth2AuthHandlerpkceVerifierLength(int length)OAuth2AuthHandlerprompt(String prompt)OAuth2AuthHandlersetupCallback(Route route)StringtoString()OAuth2AuthHandlerwithScope(String scope)OAuth2AuthHandlerwithScopes(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:
getDelegatein interfaceAuthenticationHandler
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handlein interfaceAuthenticationHandler- Specified by:
handlein 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:
acceptin interfaceAuthenticationHandler- Specified by:
acceptin interfaceConsumer<RoutingContext>
-
newInstance
public static OAuth2AuthHandler newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler arg)
-
-