Class CustomOAuth2Credential

java.lang.Object
com.github.philippheuer.credentialmanager.domain.Credential
de.presti.ree6.utils.data.CustomOAuth2Credential

public class CustomOAuth2Credential extends com.github.philippheuer.credentialmanager.domain.Credential
Custom OAuth2Credential to contain the discord user id.
  • Constructor Details

    • CustomOAuth2Credential

      public CustomOAuth2Credential(String identityProvider, String accessToken)
      Constructor
      Parameters:
      identityProvider - Identity Provider
      accessToken - Authentication Token
    • CustomOAuth2Credential

      public CustomOAuth2Credential(String identityProvider, String accessToken, @NotNull @NotNull Map<String,Object> context)
      Constructor
      Parameters:
      identityProvider - Identity Provider
      accessToken - Authentication Token
      context - Credential context
    • CustomOAuth2Credential

      public CustomOAuth2Credential(String identityProvider, String accessToken, String refreshToken, String userId, String userName, Integer expiresIn, List<String> scopes)
      Constructor
      Parameters:
      identityProvider - Identity Provider
      accessToken - Authentication Token
      refreshToken - Refresh Token
      userId - User Id
      userName - User Name
      expiresIn - Expires in x seconds
      scopes - Scopes
    • CustomOAuth2Credential

      public CustomOAuth2Credential(String identityProvider, String accessToken, String refreshToken, String userId, String userName, Integer expiresIn, List<String> scopes, Map<String,Object> context)
      Constructor
      Parameters:
      identityProvider - Identity Provider
      accessToken - Authentication Token
      refreshToken - Refresh Token
      userId - User Id
      userName - User Name
      expiresIn - Expires in x seconds
      scopes - Scopes
      context - Credential context
    • CustomOAuth2Credential

      public CustomOAuth2Credential(long discordId, String identityProvider, String accessToken, String refreshToken, String userId, String userName, Integer expiresIn, List<String> scopes)
      Constructor
      Parameters:
      discordId - Discord User Id
      identityProvider - Identity Provider
      accessToken - Authentication Token
      refreshToken - Refresh Token
      userId - User Id
      userName - User Name
      expiresIn - Expires in x seconds
      scopes - Scopes
    • CustomOAuth2Credential

      public CustomOAuth2Credential(long discordId, com.github.philippheuer.credentialmanager.domain.OAuth2Credential credential)
      Constructor.
      Parameters:
      discordId - the Discord ID of the Owner.
      credential - the original credential.
  • Method Details

    • updateCredential

      public void updateCredential(CustomOAuth2Credential newCredential)
      Updates the values with the input from the provided new credential
      Parameters:
      newCredential - the OAuth2Credential with additional information