Class Security
- java.lang.Object
-
- io.vertx.rxjava3.ext.web.openapi.router.Security
-
public class Security extends Object
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:
oauth2
oropenIdConnect
. When usingoauth2
the function will receive the openapi configuration and it is the function implementor responsibility to configure the handler correctly. ForopenIdConnect
mode 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 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 RouterBuilder
apiKeyHandler(APIKeyHandler handler)
Configure the to be used when creating the router.boolean
equals(Object o)
Security
getDelegate()
int
hashCode()
RouterBuilder
httpHandler(BasicAuthHandler handler)
Configure the to be used when creating the router.RouterBuilder
httpHandler(DigestAuthHandler handler)
Configure the to be used when creating the router.RouterBuilder
httpHandler(JWTAuthHandler handler)
Configure the to be used when creating the router.static Security
newInstance(Security arg)
RouterBuilder
oauth2Handler(String callback, java.util.function.Function<SecurityScheme,OAuth2AuthHandler> factory)
Configure the to be used when creating the router.RouterBuilder
oauth2Handler(java.util.function.Function<SecurityScheme,OAuth2AuthHandler> factory)
Configure the to be used when creating the router.Single<RouterBuilder>
openIdConnectHandler(String callback, java.util.function.Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router.Single<RouterBuilder>
openIdConnectHandler(java.util.function.Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router.Single<RouterBuilder>
rxOpenIdConnectHandler(String callback, java.util.function.Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router.Single<RouterBuilder>
rxOpenIdConnectHandler(java.util.function.Function<String,Single<OAuth2AuthHandler>> factory)
Configure the to be used when creating the router.String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<Security> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public Security getDelegate()
-
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, java.util.function.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(java.util.function.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_code
flows.- Parameters:
factory
- the handler factory that will receive the configuration and return the handler- Returns:
- caller builder
-
openIdConnectHandler
public Single<RouterBuilder> openIdConnectHandler(String callback, java.util.function.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 theopenIdConnect
discovery url and return the handler- Returns:
- caller builder
-
rxOpenIdConnectHandler
public Single<RouterBuilder> rxOpenIdConnectHandler(String callback, java.util.function.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 theopenIdConnect
discovery url and return the handler- Returns:
- caller builder
-
openIdConnectHandler
public Single<RouterBuilder> openIdConnectHandler(java.util.function.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_code
flows.- Parameters:
factory
- the handler factory that will receive theopenIdConnect
discovery url and return the handler- Returns:
- caller builder
-
rxOpenIdConnectHandler
public Single<RouterBuilder> rxOpenIdConnectHandler(java.util.function.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_code
flows.- Parameters:
factory
- the handler factory that will receive theopenIdConnect
discovery url and return the handler- Returns:
- caller builder
-
-