io.vertx.ext.auth.oauth2

## Class Oauth2Credentials

- java.lang.Object
- - io.vertx.ext.auth.oauth2.Oauth2Credentials

- All Implemented Interfaces:
    Credentials

      public class Oauth2Credentials
      extends Object
      implements Credentials

  Credentials specific to the `OAuth2Auth` provider
  Author:
    Paulo Lopes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Oauth2Credentials()`
    `Oauth2Credentials(JsonObject json)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Oauth2Credentials` | `addScope(String scope)`
    `<V> void` | `checkValid(V arg)` Implementors should override this method to perform validation.
    `String` | `getAssertion()`
    `String` | `getCode()`
    `String` | `getCodeVerifier()`
    `JsonObject` | `getJwt()`
    `String` | `getPassword()`
    `String` | `getRedirectUri()`
    `List<String>` | `getScopes()`
    `String` | `getUsername()`
    `Oauth2Credentials` | `setAssertion(String assertion)`
    `Oauth2Credentials` | `setCode(String code)`
    `Oauth2Credentials` | `setCodeVerifier(String codeVerifier)`
    `Oauth2Credentials` | `setJwt(JsonObject jwt)`
    `Oauth2Credentials` | `setPassword(String password)`
    `Oauth2Credentials` | `setRedirectUri(String redirectUri)`
    `Oauth2Credentials` | `setScopes(List<String> scopes)`
    `Oauth2Credentials` | `setUsername(String username)`
    `JsonObject` | `toJson()` Simple interop to downcast back to JSON for backwards compatibility.
    `String` | `toString()`

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

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

    - ### Methods inherited from interface io.vertx.ext.auth.authentication.Credentials

      `applyHttpChallenge, applyHttpChallenge, applyHttpChallenge, toHttpAuthorization`

- - ### Constructor Detail

    - #### Oauth2Credentials

          public Oauth2Credentials()

    - #### Oauth2Credentials

          public Oauth2Credentials(JsonObject json)

  - ### Method Detail

    - #### getCode

          public String getCode()

    - #### setCode

          public Oauth2Credentials setCode(String code)

    - #### getRedirectUri

          public String getRedirectUri()

    - #### setRedirectUri

          public Oauth2Credentials setRedirectUri(String redirectUri)

    - #### getCodeVerifier

          public String getCodeVerifier()

    - #### setCodeVerifier

          public Oauth2Credentials setCodeVerifier(String codeVerifier)

    - #### getScopes

          public List<String> getScopes()

    - #### addScope

          public Oauth2Credentials addScope(String scope)

    - #### setScopes

          public Oauth2Credentials setScopes(List<String> scopes)

    - #### getJwt

          public JsonObject getJwt()

    - #### setJwt

          public Oauth2Credentials setJwt(JsonObject jwt)

    - #### getAssertion

          public String getAssertion()

    - #### setAssertion

          public Oauth2Credentials setAssertion(String assertion)

    - #### getPassword

          public String getPassword()

    - #### setPassword

          public Oauth2Credentials setPassword(String password)

    - #### getUsername

          public String getUsername()

    - #### setUsername

          public Oauth2Credentials setUsername(String username)

    - #### toJson

          public JsonObject toJson()

      Description copied from interface: `Credentials`
      Simple interop to downcast back to JSON for backwards compatibility.
      Specified by:
        `toJson` in interface `Credentials`
      Returns:
        JSON representation of this credential.

    - #### checkValid

          public <V> void checkValid(V arg)
                              throws CredentialValidationException

      Description copied from interface: `Credentials`
      Implementors should override this method to perform validation. An argument is allowed to allow custom validation, for example, when given a configuration property, a specific property may be allowed to be null.
      Specified by:
        `checkValid` in interface `Credentials`
      Type Parameters:
        `V` - the generic type of the argument
      Parameters:
        `arg` - optional argument or null.
      Throws:
        `CredentialValidationException` - when the validation fails

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2021 Eclipse. All rights reserved.