io.vertx.ext.auth.oauth2

## Class OAuth2AuthorizationURL

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

-     public class OAuth2AuthorizationURL
      extends Object

  TypeSafe DataObject for passing needed parameters for `OAuth2Auth.authorizeURL(OAuth2AuthorizationURL)`
  Author:
    Lazar Bulic

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuth2AuthorizationURL()` Default constructor
    `OAuth2AuthorizationURL(JsonObject json)` Constructor to create an options from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `OAuth2AuthorizationURL` | `addScope(String scope)` Add a scope
    `Map<String,String>` | `getAdditionalParameters()` Get the additional parameters
    `String` | `getRedirectUri()` Get the redirect URI
    `List<String>` | `getScopes()` Get the scopes
    `String` | `getState()` Get the state
    `OAuth2AuthorizationURL` | `putAdditionalParameter(String key, String value)` Add an additional parameter
    `OAuth2AuthorizationURL` | `setAdditionalParameters(Map<String,String> additionalParameters)` Set the additional parameters
    `OAuth2AuthorizationURL` | `setRedirectUri(String redirectUri)` Set the redirect URI
    `OAuth2AuthorizationURL` | `setScopes(List<String> scopes)` Set the scopes
    `OAuth2AuthorizationURL` | `setState(String state)` Set the state
    `JsonObject` | `toJson()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### OAuth2AuthorizationURL

          public OAuth2AuthorizationURL()

      Default constructor

    - #### OAuth2AuthorizationURL

          public OAuth2AuthorizationURL(JsonObject json)

      Constructor to create an options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### getRedirectUri

          public String getRedirectUri()

      Get the redirect URI
      Returns:
        the redirectUri

    - #### setRedirectUri

          public OAuth2AuthorizationURL setRedirectUri(String redirectUri)

      Set the redirect URI
      Parameters:
        `redirectUri` - the redirectUri to set
      Returns:
        self

    - #### getScopes

          public List<String> getScopes()

      Get the scopes
      Returns:
        the scopes

    - #### setScopes

          public OAuth2AuthorizationURL setScopes(List<String> scopes)

      Set the scopes
      Parameters:
        `scopes` - the scopes to set
      Returns:
        self

    - #### addScope

          public OAuth2AuthorizationURL addScope(String scope)

      Add a scope
      Parameters:
        `scope` - the scope to add
      Returns:
        self

    - #### getState

          public String getState()

      Get the state
      Returns:
        the state

    - #### setState

          public OAuth2AuthorizationURL setState(String state)

      Set the state
      Parameters:
        `state` - the state to set
      Returns:
        self

    - #### getAdditionalParameters

          public Map<String,String> getAdditionalParameters()

      Get the additional parameters
      Returns:
        the additionalParameters

    - #### setAdditionalParameters

          public OAuth2AuthorizationURL setAdditionalParameters(Map<String,String> additionalParameters)

      Set the additional parameters
      Parameters:
        `additionalParameters` - the additionalParameters to set. Both key and value should be in final format that is expected by the provider. Example: "ui_locales" -> "fr-CA fr en"
      Returns:
        self

    - #### putAdditionalParameter

          public OAuth2AuthorizationURL putAdditionalParameter(String key,
                                                               String value)

      Add an additional parameter
      Parameters:
        `key` - the key of the parameter. Should be in final format that is expected by the provider. Example: "ui_locales"
        `value` - the value of the parameter. Should be in final format that is expected by the provider. Example: "fr-CA fr en"
      Returns:
        self

    - #### toJson

          public JsonObject toJson()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2023 Eclipse. All rights reserved.