Class Security
java.lang.Object
io.vertx.reactivex.ext.web.openapi.router.Security
- All Implemented Interfaces:
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 original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiKeyHandler(APIKeyHandler handler) Configure the to be used when creating the router.booleaninthashCode()httpHandler(BasicAuthHandler handler) Configure the to be used when creating the router.httpHandler(DigestAuthHandler handler) Configure the to be used when creating the router.httpHandler(JWTAuthHandler handler) Configure the to be used when creating the router.static SecuritynewInstance(Security arg) oauth2Handler(String callback, Function<SecurityScheme, OAuth2AuthHandler> factory) Configure the to be used when creating the router.oauth2Handler(Function<SecurityScheme, OAuth2AuthHandler> factory) Configure the to be used when creating the router.openIdConnectHandler(Function<String, Single<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.openIdConnectHandler(String callback, Function<String, Single<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.openIdConnectHandler(String callback, Function<String, Future<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.openIdConnectHandler(Function<String, Future<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.rxOpenIdConnectHandler(Function<String, Single<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.rxOpenIdConnectHandler(String callback, Function<String, Single<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.rxOpenIdConnectHandler(String callback, Function<String, Future<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.rxOpenIdConnectHandler(Function<String, Future<OAuth2AuthHandler>> factory) Configure the to be used when creating the router.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Security
-
Security
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
apiKeyHandler
Configure the to be used when creating the router.- Parameters:
handler- the handler to be used- Returns:
- caller builder
-
httpHandler
Configure the to be used when creating the router.- Parameters:
handler- the handler to be used- Returns:
- caller builder
-
httpHandler
Configure the to be used when creating the router.- Parameters:
handler- the handler to be used- Returns:
- caller builder
-
httpHandler
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
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 Future<RouterBuilder> openIdConnectHandler(String callback, Function<String, Future<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, Future<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 Future<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 Future<RouterBuilder> openIdConnectHandler(Function<String, Future<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, Future<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
-
openIdConnectHandler
public Future<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
-
newInstance
-