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 Details

    • OAuth2AuthorizationURL

      public OAuth2AuthorizationURL()
      Default constructor
    • OAuth2AuthorizationURL

      public OAuth2AuthorizationURL(JsonObject json)
      Constructor to create an options from JSON
      Parameters:
      json - the JSON
    • OAuth2AuthorizationURL

      public OAuth2AuthorizationURL(OAuth2AuthorizationURL other)
      Constructor to create an options from an existing options
      Parameters:
      other - the existing one to clone
  • Method Details

    • 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
    • getCodeChallenge

      public String getCodeChallenge()
      PKCE code challenge
    • setCodeChallenge

      public OAuth2AuthorizationURL setCodeChallenge(String codeChallenge)
      PKCE code challenge
    • getCodeChallengeMethod

      public String getCodeChallengeMethod()
      PKCE code challenge method
    • setCodeChallengeMethod

      public OAuth2AuthorizationURL setCodeChallengeMethod(String codeChallengeMethod)
      PKCE code challenge method
    • getPrompt

      public String getPrompt()
      Hint on kind of IdP prompt
    • setPrompt

      public OAuth2AuthorizationURL setPrompt(String prompt)
      Hint on kind of IdP prompt
    • getLoginHint

      public String getLoginHint()
      Hint on login name for IdP UI
    • setLoginHint

      public OAuth2AuthorizationURL setLoginHint(String loginHint)
      Hint on login name for IdP UI
    • 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