java.lang.Object
io.vertx.mutiny.ext.web.UserContext
- All Implemented Interfaces:
io.smallrye.mutiny.vertx.MutinyDelegate
A web user is extended user coupled to the context and is used to perform verifications
and actions on behalf of the user. Actions can be:
impersonate()- Require a re-authentication to switch user identitiesrestore()- De-escalate a previous impersonate calllogout(java.lang.String)- Logout the user from this application and redirect to a uriclear()- Same as logout, without requirind a redirect
original non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserContext(io.vertx.ext.web.UserContext delegate) UserContext(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclear()booleanio.vertx.mutiny.ext.auth.Userget()io.vertx.ext.web.UserContextinthashCode()io.smallrye.mutiny.Uni<Void> io.smallrye.mutiny.Uni<Void> impersonate(String redirectUri) impersonateAndAwait(String redirectUri) voidvoidimpersonateAndForget(String redirectUri) io.smallrye.mutiny.Uni<Void> logout()io.smallrye.mutiny.Uni<Void> logoutAndAwait(String redirectUri) voidvoidlogoutAndForget(String redirectUri) static UserContextnewInstance(io.vertx.ext.web.UserContext arg) io.smallrye.mutiny.Uni<Void> restore()io.smallrye.mutiny.Uni<Void> restoreAndAwait(String redirectUri) voidvoidrestoreAndForget(String redirectUri) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
UserContext
public UserContext(io.vertx.ext.web.UserContext delegate) -
UserContext
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.UserContext getDelegate()- Specified by:
getDelegatein interfaceio.smallrye.mutiny.vertx.MutinyDelegate
-
toString
-
equals
-
hashCode
public int hashCode() -
get
public io.vertx.mutiny.ext.auth.User get()- Returns:
- the user, or null if the current user is not authenticated.
-
authenticated
public boolean authenticated() -
loginHint
- Parameters:
loginHint- the desired login name, for example:admin.- Returns:
- fluent self
-
impersonate
-
impersonateAndAwait
-
impersonateAndForget
public void impersonateAndForget() -
impersonate
-
impersonateAndAwait
-
impersonateAndForget
-
restore
-
restoreAndAwait
-
restoreAndForget
public void restoreAndForget() -
restore
-
restoreAndAwait
-
restoreAndForget
-
logout
-
logoutAndAwait
-
logoutAndForget
-
logout
-
logoutAndAwait
-
logoutAndForget
public void logoutAndForget() -
clear
public void clear() -
newInstance
-