Package io.vertx.mutiny.ext.web
Class UserContext
java.lang.Object
io.vertx.mutiny.ext.web.UserContext
- All Implemented Interfaces:
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 TypeMethodDescriptionboolean
void
clear()
boolean
get()
io.vertx.ext.web.UserContext
int
hashCode()
io.smallrye.mutiny.Uni<Void>
io.smallrye.mutiny.Uni<Void>
impersonate
(String redirectUri) impersonateAndAwait
(String redirectUri) void
void
impersonateAndForget
(String redirectUri) io.smallrye.mutiny.Uni<Void>
logout()
io.smallrye.mutiny.Uni<Void>
logoutAndAwait
(String redirectUri) void
void
logoutAndForget
(String redirectUri) static UserContext
newInstance
(io.vertx.ext.web.UserContext arg) io.smallrye.mutiny.Uni<Void>
restore()
io.smallrye.mutiny.Uni<Void>
restoreAndAwait
(String redirectUri) void
void
restoreAndForget
(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:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
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
-