io.vertx.rxjava.ext.auth

## Class User

- java.lang.Object
- - io.vertx.rxjava.ext.auth.User

- Direct Known Subclasses:
    AccessToken

      public class User
      extends Object

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

  Please consult the documentation for a detailed explanation.

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<User>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `User(User delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `User` | `clearCache()` The User object will cache any authorities that it knows it has to avoid hitting the underlying auth provider each time.
    `boolean` | `equals(Object o)`
    `User` | `getDelegate()`
    `int` | `hashCode()`
    `User` | `isAuthorised(String authority, Handler<AsyncResult<Boolean>> resultHandler)` Deprecated.
    `Observable<Boolean>` | `isAuthorisedObservable(String authority)` Deprecated. use `rxIsAuthorised(java.lang.String)` instead
    `User` | `isAuthorized(String authority, Handler<AsyncResult<Boolean>> resultHandler)` Is the user authorised to
    `Observable<Boolean>` | `isAuthorizedObservable(String authority)` Deprecated. use `rxIsAuthorized(java.lang.String)` instead
    `static User` | `newInstance(User arg)`
    `JsonObject` | `principal()` Get the underlying principal for the User.
    `Single<Boolean>` | `rxIsAuthorised(String authority)` Deprecated.
    `Single<Boolean>` | `rxIsAuthorized(String authority)` Is the user authorised to
    `void` | `setAuthProvider(AuthProvider authProvider)` Set the auth provider for the User.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<User> __TYPE_ARG

  - ### Constructor Detail

    - #### User

          public User(User delegate)

  - ### Method Detail

    - #### 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`

    - #### getDelegate

          public User getDelegate()

    - #### isAuthorized

          public User isAuthorized(String authority,
                                   Handler<AsyncResult<Boolean>> resultHandler)

      Is the user authorised to
      Parameters:
        `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 `AsyncResult` containing the value `true` if the they has the authority or `false` otherwise.
      Returns:
        the User to enable fluent use

    - #### isAuthorizedObservable

          @Deprecated
          public Observable<Boolean> isAuthorizedObservable(String authority)

      Deprecated. use `rxIsAuthorized(java.lang.String)` instead
      Is the user authorised to
      Parameters:
        `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`.
      Returns:
        the User to enable fluent use

    - #### rxIsAuthorized

          public Single<Boolean> rxIsAuthorized(String authority)

      Is the user authorised to
      Parameters:
        `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`.
      Returns:
        the User to enable fluent use

    - #### isAuthorised

          @Deprecated
          public User isAuthorised(String authority,
                                               Handler<AsyncResult<Boolean>> resultHandler)

      Deprecated.
      Parameters:
        `authority` -
        `resultHandler` -
      Returns:

    - #### isAuthorisedObservable

          @Deprecated
          public Observable<Boolean> isAuthorisedObservable(String authority)

      Deprecated. use `rxIsAuthorised(java.lang.String)` instead
      Parameters:
        `authority` -
      Returns:

    - #### rxIsAuthorised

          @Deprecated
          public Single<Boolean> rxIsAuthorised(String authority)

      Deprecated.
      Parameters:
        `authority` -
      Returns:

    - #### clearCache

          public User clearCache()

      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

    - #### principal

          public JsonObject principal()

      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

    - #### setAuthProvider

          public void setAuthProvider(AuthProvider authProvider)

      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.
      Parameters:
        `authProvider` - the AuthProvider - this must be the same type of AuthProvider that originally created the User

    - #### newInstance

          public static User newInstance(User arg)

Copyright © 2018 Eclipse. All rights reserved.