Class OAuth2Authentication

java.lang.Object
com.mparticle.sdk.model.registration.authentication.AuthenticationConfiguration
com.mparticle.sdk.model.registration.authentication.OAuth2Authentication

public final class OAuth2Authentication extends AuthenticationConfiguration
  • Constructor Details

    • OAuth2Authentication

      public OAuth2Authentication()
  • Method Details

    • getAuthorizationUrl

      public String getAuthorizationUrl()
      Returns:
      Authorization Url
    • setAuthorizationUrl

      public OAuth2Authentication setAuthorizationUrl(String authorizationUrl)
      Parameters:
      authorizationUrl - Authorization Url
      Returns:
      this
    • getRefreshUrl

      public String getRefreshUrl()
      Returns:
      Refresh URL
    • setRefreshUrl

      public OAuth2Authentication setRefreshUrl(String refreshUrl)
      Parameters:
      refreshUrl - Refresh URL
      Returns:
      this
    • getTokenUrl

      public String getTokenUrl()
      Returns:
      Token Url
    • setTokenUrl

      public OAuth2Authentication setTokenUrl(String tokenUrl)
      Parameters:
      tokenUrl - Token Url
      Returns:
      this
    • getGrantType

      public OAuth2Authentication.GrantType getGrantType()
      Returns:
      Method used to gain Access Tokens
    • setGrantType

      public OAuth2Authentication setGrantType(OAuth2Authentication.GrantType grantType)
      Parameters:
      grantType - Method used to gain Access Tokens
      Returns:
      this
    • getDefaultExpiresIn

      public int getDefaultExpiresIn()
      Returns:
      duration of time the access token is granted for
    • setDefaultExpiresIn

      public OAuth2Authentication setDefaultExpiresIn(int defaultExpiresIn)
      Parameters:
      defaultExpiresIn - duration of time the access token is granted for
      Returns:
      this
    • getClientId

      public String getClientId()
      Returns:
      Unique public identifier
    • setClientId

      public OAuth2Authentication setClientId(String clientId)
      Parameters:
      clientId - Unique public identifier
      Returns:
      this
    • getAccessTokenType

      public OAuth2Authentication.AccessTokenType getAccessTokenType()
      Returns:
      Specifies how the access token will be provided
    • setAccessTokenType

      public OAuth2Authentication setAccessTokenType(OAuth2Authentication.AccessTokenType accessTokenType)
      Parameters:
      accessTokenType - Specifies how the access token will be provided
      Returns:
      this
    • getCustomHeaderName

      public String getCustomHeaderName()
      Returns:
      Name of the custom header for the access token
    • setCustomHeaderName

      public OAuth2Authentication setCustomHeaderName(String customHeaderName)
      Parameters:
      customHeaderName - Name of the custom header for the access token
      Returns:
      this
    • getParamClientIdName

      public String getParamClientIdName()
      Returns:
      Custom name for ClientID
    • setParamClientIdName

      public OAuth2Authentication setParamClientIdName(String paramClientIdName)
      Parameters:
      paramClientIdName - Custom name for ClientID
      Returns:
      this
    • getParamSecretName

      public String getParamSecretName()
      Returns:
      Custom name for ClientSecret
    • setParamSecretName

      public OAuth2Authentication setParamSecretName(String paramSecretName)
      Parameters:
      paramSecretName - Custom name for ClientSecret
      Returns:
      this
    • getScopes

      public ScopeDetail[] getScopes()
      Returns:
      Scope to limit an app's access to user account
    • setScopes

      public OAuth2Authentication setScopes(ScopeDetail[] scopes)
      Parameters:
      scopes - Scope to limit an app's access to user account
      Returns:
      this