Class TwitchIdentityProvider

java.lang.Object
com.github.philippheuer.credentialmanager.domain.IdentityProvider
com.github.philippheuer.credentialmanager.identityprovider.OAuth2IdentityProvider
com.github.twitch4j.auth.providers.TwitchIdentityProvider

public class TwitchIdentityProvider
extends com.github.philippheuer.credentialmanager.identityprovider.OAuth2IdentityProvider
Twitch Identity Provider
  • Field Summary

    Fields inherited from class com.github.philippheuer.credentialmanager.identityprovider.OAuth2IdentityProvider

    authUrl, clientId, clientSecret, redirectUrl, responseType, scopeSeperator, tokenEndpointPostType, tokenUrl

    Fields inherited from class com.github.philippheuer.credentialmanager.domain.IdentityProvider

    configuration, credentialManager, providerName, providerType
  • Constructor Summary

    Constructors
    Constructor Description
    TwitchIdentityProvider​(java.lang.String clientId, java.lang.String clientSecret, java.lang.String redirectUrl)
    Constructor
  • Method Summary

    Modifier and Type Method Description
    java.util.Optional<com.github.philippheuer.credentialmanager.domain.OAuth2Credential> getAdditionalCredentialInformation​(com.github.philippheuer.credentialmanager.domain.OAuth2Credential credential)
    Get Auth Token Information
    boolean revokeCredential​(com.github.philippheuer.credentialmanager.domain.OAuth2Credential credential)
    Revokes an access token.

    Methods inherited from class com.github.philippheuer.credentialmanager.identityprovider.OAuth2IdentityProvider

    getAppAccessToken, getAuthenticationUrl, getAuthenticationUrl, getCredentialByCode, getCredentialByUsernameAndPassword, getScopedCredentialByUsernameAndPassword, refreshCredential

    Methods inherited from class com.github.philippheuer.credentialmanager.domain.IdentityProvider

    canEqual, equals, getConfiguration, getCredentialManager, getProviderName, getProviderType, hashCode, setConfiguration, setCredentialManager, setProviderName, setProviderType, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TwitchIdentityProvider

      public TwitchIdentityProvider​(java.lang.String clientId, java.lang.String clientSecret, java.lang.String redirectUrl)
      Constructor
      Parameters:
      clientId - OAuth Client Id
      clientSecret - OAuth Client Secret
      redirectUrl - Redirect Url
  • Method Details

    • getAdditionalCredentialInformation

      public java.util.Optional<com.github.philippheuer.credentialmanager.domain.OAuth2Credential> getAdditionalCredentialInformation​(com.github.philippheuer.credentialmanager.domain.OAuth2Credential credential)
      Get Auth Token Information
      Specified by:
      getAdditionalCredentialInformation in class com.github.philippheuer.credentialmanager.identityprovider.OAuth2IdentityProvider
      Parameters:
      credential - OAuth2 Credential
    • revokeCredential

      public boolean revokeCredential​(com.github.philippheuer.credentialmanager.domain.OAuth2Credential credential)
      Revokes an access token.

      The clientId passed to TwitchIdentityProvider must match that used to create the credential

      Parameters:
      credential - the OAuth2Credential to be revoked
      Returns:
      whether the credential was successfully revoked