public interface UserContext
impersonate()
- Require a re-authentication to switch user identitiesrestore()
- De-escalate a previous impersonate calllogout()
- Logout the user from this application and redirect to a uriclear()
- Same as logout, without requirind a redirectModifier and Type | Method and Description |
---|---|
default boolean |
authenticated() |
void |
clear()
Clear can be called from any route handler which needs to terminate a login session.
|
User |
get()
Get the authenticated user (if any).
|
Future<Void> |
impersonate()
Impersonates a second identity.
|
default void |
impersonate(Handler<AsyncResult<Void>> callback) |
Future<Void> |
impersonate(String redirectUri)
Impersonates a second identity.
|
default void |
impersonate(String redirectUri,
Handler<AsyncResult<Void>> callback) |
UserContext |
loginHint(String loginHint)
When performing a web identity operation, hint if possible to the identity provider to use the given login.
|
Future<Void> |
logout()
Logout can be called from any route handler which needs to terminate a login session.
|
default void |
logout(Handler<AsyncResult<Void>> callback) |
Future<Void> |
logout(String redirectUri)
Logout can be called from any route handler which needs to terminate a login session.
|
default void |
logout(String redirectUri,
Handler<AsyncResult<Void>> callback) |
Future<Void> |
restore()
Undo a previous call to a impersonation.
|
default void |
restore(Handler<AsyncResult<Void>> callback) |
Future<Void> |
restore(String redirectUri)
Undo a previous call to an impersonation.
|
default void |
restore(String redirectUri,
Handler<AsyncResult<Void>> callback) |
User get()
default boolean authenticated()
UserContext loginHint(String loginHint)
loginHint
- the desired login name, for example: admin
.Future<Void> impersonate()
default void impersonate(Handler<AsyncResult<Void>> callback)
Future<Void> impersonate(String redirectUri)
redirectUri
- the uri to redirect the user to after the authentication.default void impersonate(String redirectUri, Handler<AsyncResult<Void>> callback)
Future<Void> restore()
default void restore(Handler<AsyncResult<Void>> callback)
Future<Void> restore(String redirectUri)
redirectUri
- the uri to redirect the user to after the re-authentication.default void restore(String redirectUri, Handler<AsyncResult<Void>> callback)
Future<Void> logout(String redirectUri)
User
and clear the Session
(if any) in the current context. Followed by a
redirect to the given uri.redirectUri
- the uri to redirect the user to after the logout.default void logout(String redirectUri, Handler<AsyncResult<Void>> callback)
Future<Void> logout()
User
and clear the Session
(if any) in the current context. Followed by a
redirect to /
.default void logout(Handler<AsyncResult<Void>> callback)
void clear()
Copyright © 2025 Eclipse. All rights reserved.