Class Security
- java.lang.Object
-
- io.vertx.rxjava3.ext.web.openapi.router.Security
-
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
public class Security extends Object implements io.vertx.lang.rx.RxDelegate
An authentication handler factory. This class will hold factories for creating objects.Handlers will be used when creating the router. This class will configure the handlers to some extent:
- - api key handlers will be configured from the document to avoid setup mistakes
- - nothing is required to be configured, they will be used as is
- - nothing is required to be configured, they will be used as is
- - nothing is required to be configured, they will be used as is. Note that for scopes you may need to configure the provider to locate the claims in the right place
- can be used in two forms:
oauth2oropenIdConnect. When usingoauth2the function will receive the openapi configuration and it is the function implementor responsibility to configure the handler correctly. ForopenIdConnectmode the asynchronous function can be used to use the discovery mechanism.
NOTE: This class has been automatically generated from the
originalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<Security>__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RouterBuilderapiKeyHandler(APIKeyHandler handler)Configure the to be used when creating the router.booleanequals(Object o)SecuritygetDelegate()inthashCode()RouterBuilderhttpHandler(BasicAuthHandler handler)Configure the to be used when creating the router.RouterBuilderhttpHandler(DigestAuthHandler handler)Configure the to be used when creating the router.RouterBuilderhttpHandler(JWTAuthHandler handler)Configure the to be used when creating the router.static SecuritynewInstance(Security arg)RouterBuilderoauth2Handler(String callback, Function<SecurityScheme,OAuth2AuthHandler> factory)Configure the to be used when creating the router.RouterBuilderoauth2Handler(Function<SecurityScheme,OAuth2AuthHandler> factory)Configure the to be used when creating the router.Single<RouterBuilder>openIdConnectHandler(String callback, Function<String,Single<OAuth2AuthHandler>> factory)Configure the to be used when creating the router.Single<RouterBuilder>openIdConnectHandler(Function<String,Single<OAuth2AuthHandler>> factory)Configure the to be used when creating the router.Single<RouterBuilder>rxOpenIdConnectHandler(String callback, Function<String,Single<OAuth2AuthHandler>> factory)Configure the to be used when creating the router.Single<RouterBuilder>rxOpenIdConnectHandler(Function<String,Single<OAuth2AuthHandler>> factory)Configure the to be used when creating the router.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<Security> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public Security getDelegate()
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
apiKeyHandler
public RouterBuilder apiKeyHandler(APIKeyHandler handler)
Configure the to be used when creating the router.- Parameters:
handler- the handler to be used- Returns:
- caller builder
-
httpHandler
public RouterBuilder httpHandler(BasicAuthHandler handler)
Configure the to be used when creating the router.- Parameters:
handler- the handler to be used- Returns:
- caller builder
-
httpHandler
public RouterBuilder httpHandler(DigestAuthHandler handler)
Configure the to be used when creating the router.- Parameters:
handler- the handler to be used- Returns:
- caller builder
-
httpHandler
public RouterBuilder httpHandler(JWTAuthHandler handler)
Configure the to be used when creating the router.- Parameters:
handler- the handler to be used- Returns:
- caller builder
-
oauth2Handler
public RouterBuilder oauth2Handler(String callback, Function<SecurityScheme,OAuth2AuthHandler> factory)
Configure the to be used when creating the router.- Parameters:
callback- the callback path to be used to validate tokensfactory- the handler factory that will receive the configuration and return the handler- Returns:
- caller builder
-
oauth2Handler
public RouterBuilder oauth2Handler(Function<SecurityScheme,OAuth2AuthHandler> factory)
Configure the to be used when creating the router. In this mode the callback is not used and will not handleauthorization_codeflows.- Parameters:
factory- the handler factory that will receive the configuration and return the handler- Returns:
- caller builder
-
openIdConnectHandler
public Single<RouterBuilder> openIdConnectHandler(String callback, Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router.- Parameters:
callback- the callback path to be used to validate tokensfactory- the handler factory that will receive theopenIdConnectdiscovery url and return the handler- Returns:
- caller builder
-
rxOpenIdConnectHandler
public Single<RouterBuilder> rxOpenIdConnectHandler(String callback, Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router.- Parameters:
callback- the callback path to be used to validate tokensfactory- the handler factory that will receive theopenIdConnectdiscovery url and return the handler- Returns:
- caller builder
-
openIdConnectHandler
public Single<RouterBuilder> openIdConnectHandler(Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router. In this mode the callback is not used and will not handleauthorization_codeflows.- Parameters:
factory- the handler factory that will receive theopenIdConnectdiscovery url and return the handler- Returns:
- caller builder
-
rxOpenIdConnectHandler
public Single<RouterBuilder> rxOpenIdConnectHandler(Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router. In this mode the callback is not used and will not handleauthorization_codeflows.- Parameters:
factory- the handler factory that will receive theopenIdConnectdiscovery url and return the handler- Returns:
- caller builder
-
-