vertx-lang-scala-docs_2.12 3.4.2 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package auth
  Definition Classes
    ext
-  package htdigest
  Definition Classes
    auth
-  package jdbc
  Definition Classes
    auth
-  package jwt
  Definition Classes
    auth
-  package mongo
  Definition Classes
    auth
-  package oauth2
  Definition Classes
    auth
-  package shiro
  Definition Classes
    auth
- AuthOptions
- AuthProvider
- ChainAuth
- User
- VertxContextPRNG

c

io.vertx.scala.ext.auth

# User 

###
Companion object User

#### class User extends AnyRef

Represents an authenticates User and contains operations to authorise the user.

Please consult the documentation for a detailed explanation.

Linear Supertypes
AnyRef, Any
Known Subclasses
AccessToken
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. User
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new User(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
6.  def clearCache(): User

   The User object will cache any authorities that it knows it has to avoid hitting the underlying auth provider each time.

   The User object will cache any authorities that it knows it has to avoid hitting the underlying auth provider each time. Use this method if you want to clear this cache.

   returns

     the User to enable fluent use

7.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... )
8.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
9.  def equals(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
10.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
11.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
12.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
13.  def isAuthorised(authority: String, resultHandler: Handler[AsyncResult[Boolean]]): User

    Is the user authorised to

    Is the user authorised to

    authority

      the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`.

    resultHandler

      handler that will be called with an io.vertx.lang.scala.AsyncResult containing the value `true` if the they has the authority or `false` otherwise.

    returns

      the User to enable fluent use

14.  def isAuthorisedFuture(authority: String): Future[Boolean]

    Like isAuthorised but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

15.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
16.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
17.  final def notify(): Unit
    Definition Classes
      AnyRef
18.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
19.  def principal(): JsonObject

    Get the underlying principal for the User.

    Get the underlying principal for the User. What this actually returns depends on the implementation. For a simple user/password based auth, it's likely to contain a JSON object with the following structure:

          {
            "username", "tim"
          `

    returns

      JSON representation of the Principal

20.  def setAuthProvider(authProvider: AuthProvider): Unit

    Set the auth provider for the User.

    Set the auth provider for the User. This is typically used to reattach a detached User with an AuthProvider, e.g. after it has been deserialized.

    authProvider

      the AuthProvider - this must be the same type of AuthProvider that originally created the User

21.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
22.  def toString(): String
    Definition Classes
      AnyRef → Any
23.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
24.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
25.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped