Class QuarkusHttpUser
- java.lang.Object
-
- io.quarkus.vertx.http.runtime.security.QuarkusHttpUser
-
- All Implemented Interfaces:
io.vertx.ext.auth.User
public class QuarkusHttpUser extends Object implements io.vertx.ext.auth.User
Basic vert.x user representation
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTH_FAILURE_HANDLER
The key that stores a BiConsumer that handles auth failures This can be overridden by downstream handlers such as Undertow to control auth failure handling.static String
DEFERRED_IDENTITY_KEY
Only used when proactive auth is disabled
-
Constructor Summary
Constructors Constructor Description QuarkusHttpUser(io.quarkus.security.identity.SecurityIdentity securityIdentity)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description io.vertx.core.json.JsonObject
attributes()
io.vertx.ext.auth.User
clearCache()
Deprecated.io.quarkus.security.identity.SecurityIdentity
getSecurityIdentity()
static io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity>
getSecurityIdentity(io.vertx.ext.web.RoutingContext routingContext, io.quarkus.security.identity.IdentityProviderManager identityProviderManager)
Gets the current user from the routing context.static io.quarkus.security.identity.SecurityIdentity
getSecurityIdentityBlocking(io.vertx.ext.web.RoutingContext routingContext, io.quarkus.security.identity.IdentityProviderManager identityProviderManager)
Gets the current user from the routing context.io.vertx.ext.auth.User
isAuthorized(io.vertx.ext.auth.authorization.Authorization authority, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> resultHandler)
io.vertx.ext.auth.User
isAuthorized(String authority, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> resultHandler)
io.vertx.ext.auth.User
merge(io.vertx.ext.auth.User other)
io.vertx.core.json.JsonObject
principal()
void
setAuthProvider(io.vertx.ext.auth.AuthProvider authProvider)
Deprecated.
-
-
-
Field Detail
-
DEFERRED_IDENTITY_KEY
public static final String DEFERRED_IDENTITY_KEY
Only used when proactive auth is disabled- See Also:
- Constant Field Values
-
AUTH_FAILURE_HANDLER
public static final String AUTH_FAILURE_HANDLER
The key that stores a BiConsumer that handles auth failures This can be overridden by downstream handlers such as Undertow to control auth failure handling.- See Also:
- Constant Field Values
-
-
Method Detail
-
attributes
public io.vertx.core.json.JsonObject attributes()
- Specified by:
attributes
in interfaceio.vertx.ext.auth.User
-
isAuthorized
public io.vertx.ext.auth.User isAuthorized(io.vertx.ext.auth.authorization.Authorization authority, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> resultHandler)
- Specified by:
isAuthorized
in interfaceio.vertx.ext.auth.User
-
isAuthorized
public io.vertx.ext.auth.User isAuthorized(String authority, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> resultHandler)
- Specified by:
isAuthorized
in interfaceio.vertx.ext.auth.User
-
clearCache
@Deprecated public io.vertx.ext.auth.User clearCache()
Deprecated.- Specified by:
clearCache
in interfaceio.vertx.ext.auth.User
-
principal
public io.vertx.core.json.JsonObject principal()
- Specified by:
principal
in interfaceio.vertx.ext.auth.User
-
setAuthProvider
@Deprecated public void setAuthProvider(io.vertx.ext.auth.AuthProvider authProvider)
Deprecated.- Specified by:
setAuthProvider
in interfaceio.vertx.ext.auth.User
-
getSecurityIdentity
public io.quarkus.security.identity.SecurityIdentity getSecurityIdentity()
-
getSecurityIdentityBlocking
public static io.quarkus.security.identity.SecurityIdentity getSecurityIdentityBlocking(io.vertx.ext.web.RoutingContext routingContext, io.quarkus.security.identity.IdentityProviderManager identityProviderManager)
Gets the current user from the routing context. This method may block if proactive authentication is disabled, as it may need to perform a potentially blocking operation. If an IPM is provided this method will return the anonymous identity if there is no active user, otherwise it will return null if there is no user.
-
merge
public io.vertx.ext.auth.User merge(io.vertx.ext.auth.User other)
- Specified by:
merge
in interfaceio.vertx.ext.auth.User
-
getSecurityIdentity
public static io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> getSecurityIdentity(io.vertx.ext.web.RoutingContext routingContext, io.quarkus.security.identity.IdentityProviderManager identityProviderManager)
Gets the current user from the routing context. If an IPM is provided this method will return the anonymous identity if there is no active user, otherwise the Uni will resolve to null if there is no user.
-
-