Package com.lpvs.entity.enums
Enum Class OAuthAttributes
- All Implemented Interfaces:
Serializable
,Comparable<OAuthAttributes>
,Constable
Enum representing OAuth attributes for various providers.
Each constant in this enum corresponds to an OAuth provider, providing a way to extract
attributes and create a
MemberProfile
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemberProfile
Extracts OAuth attributes based on the registration ID and creates a MemberProfile.static OAuthAttributes
Returns the enum constant of this class with the specified name.static OAuthAttributes[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GOOGLE
Represents OAuth attributes for Google authentication. -
NAVER
Represents OAuth attributes for Naver authentication. -
KAKAO
Represents OAuth attributes for Kakao authentication. -
GITHUB
Represents OAuth attributes for GitHub authentication.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
extract
Extracts OAuth attributes based on the registration ID and creates a MemberProfile.- Parameters:
registrationId
- The registration ID associated with the OAuth provider.attributes
- The map of OAuth attributes.- Returns:
- A MemberProfile created from the extracted OAuth attributes.
- Throws:
IllegalArgumentException
- if no matching OAuthAttributes is found for the given registrationId.
-