Package de.presti.ree6.utils.data
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.
-
Field Summary
Fields inherited from class com.github.philippheuer.credentialmanager.domain.Credential
userId
-
Constructor Summary
ConstructorDescriptionCustomOAuth2Credential
(long discordId, com.github.philippheuer.credentialmanager.domain.OAuth2Credential credential) Constructor.CustomOAuth2Credential
(long discordId, String identityProvider, String accessToken, String refreshToken, String userId, String userName, Integer expiresIn, List<String> scopes) ConstructorCustomOAuth2Credential
(String identityProvider, String accessToken) ConstructorCustomOAuth2Credential
(String identityProvider, String accessToken, @NotNull Map<String, Object> context) ConstructorCustomOAuth2Credential
(String identityProvider, String accessToken, String refreshToken, String userId, String userName, Integer expiresIn, List<String> scopes) ConstructorCustomOAuth2Credential
(String identityProvider, String accessToken, String refreshToken, String userId, String userName, Integer expiresIn, List<String> scopes, Map<String, Object> context) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
updateCredential
(CustomOAuth2Credential newCredential) Updates the values with the input from the provided new credentialMethods inherited from class com.github.philippheuer.credentialmanager.domain.Credential
canEqual, equals, getIdentityProvider, getUserId, hashCode, setUserId, toString
-
Constructor Details
-
CustomOAuth2Credential
Constructor- Parameters:
identityProvider
- Identity ProvideraccessToken
- Authentication Token
-
CustomOAuth2Credential
public CustomOAuth2Credential(String identityProvider, String accessToken, @NotNull @NotNull Map<String, Object> context) Constructor- Parameters:
identityProvider
- Identity ProvideraccessToken
- Authentication Tokencontext
- Credential context
-
CustomOAuth2Credential
public CustomOAuth2Credential(String identityProvider, String accessToken, String refreshToken, String userId, String userName, Integer expiresIn, List<String> scopes) Constructor- Parameters:
identityProvider
- Identity ProvideraccessToken
- Authentication TokenrefreshToken
- Refresh TokenuserId
- User IduserName
- User NameexpiresIn
- Expires in x secondsscopes
- 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 ProvideraccessToken
- Authentication TokenrefreshToken
- Refresh TokenuserId
- User IduserName
- User NameexpiresIn
- Expires in x secondsscopes
- Scopescontext
- 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 IdidentityProvider
- Identity ProvideraccessToken
- Authentication TokenrefreshToken
- Refresh TokenuserId
- User IduserName
- User NameexpiresIn
- Expires in x secondsscopes
- 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
Updates the values with the input from the provided new credential- Parameters:
newCredential
- the OAuth2Credential with additional information
-