Class UserContext

java.lang.Object
io.vertx.mutiny.ext.web.UserContext
All Implemented Interfaces:
MutinyDelegate

public class UserContext extends Object implements 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 identities
  • restore() - De-escalate a previous impersonate call
  • logout(java.lang.String) - Logout the user from this application and redirect to a uri
  • clear() - Same as logout, without requirind a redirect

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • UserContext

      public UserContext(io.vertx.ext.web.UserContext delegate)
    • UserContext

      public UserContext(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.UserContext getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • get

      public User get()
      Returns:
      the user, or null if the current user is not authenticated.
    • authenticated

      public boolean authenticated()
    • loginHint

      public UserContext loginHint(String loginHint)
      Parameters:
      loginHint - the desired login name, for example: admin.
      Returns:
      fluent self
    • impersonate

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> impersonate()
    • impersonateAndAwait

      public Void impersonateAndAwait()
    • impersonateAndForget

      public void impersonateAndForget()
    • impersonate

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> impersonate(String redirectUri)
    • impersonateAndAwait

      public Void impersonateAndAwait(String redirectUri)
    • impersonateAndForget

      public void impersonateAndForget(String redirectUri)
    • restore

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> restore()
    • restoreAndAwait

      public Void restoreAndAwait()
    • restoreAndForget

      public void restoreAndForget()
    • restore

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> restore(String redirectUri)
    • restoreAndAwait

      public Void restoreAndAwait(String redirectUri)
    • restoreAndForget

      public void restoreAndForget(String redirectUri)
    • logout

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> logout(String redirectUri)
    • logoutAndAwait

      public Void logoutAndAwait(String redirectUri)
    • logoutAndForget

      public void logoutAndForget(String redirectUri)
    • logout

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> logout()
    • logoutAndAwait

      public Void logoutAndAwait()
    • logoutAndForget

      public void logoutAndForget()
    • clear

      public void clear()
    • newInstance

      public static UserContext newInstance(io.vertx.ext.web.UserContext arg)