Package com.skava.auth.constant
Enum Class AuthResponseCodes
- All Implemented Interfaces:
Serializable
,Comparable<AuthResponseCodes>
,Constable
This Enumerator used as response exchange objects from services to controllers for both success and failures.
- Version:
- $Id: $Id
- Author:
- Infosys Equinox
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuildResponse
(org.springframework.context.MessageSource messageSource, Object responseBody) This method build and return the localized error response as validation error response when response from service is not successful.static String
getMessage
(org.springframework.context.MessageSource messageSource, AuthResponseCodes responseCode) This method return the localized response message using locale context holder.static AuthResponseCodes
Returns the enum constant of this class with the specified name.static AuthResponseCodes[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTH_SUCCESS
-
AUTH_FAILURE
-
AUTH_SESSION_CREATED
-
AUTH_REQUEST_INVALID
-
AUTH_UNAUTHORIZED
-
AUTH_FORBIDDEN
-
AUTH_SESSION_NOT_AVAILABLE
-
AUTH_RESOURCE_NOT_FOUND
-
AUTH_ROLE_NAME_INVALID
-
AUTH_ROLES_ADDED
-
AUTH_USERROLES_NOTFOUND
-
AUTH_USER_ALREAY_MAPPED
-
AUTH_USER_ROLE_NOT_MAPPED
-
AUTH_USER_ID_INVALID
-
AUTH_COLLECTION_INVALID
-
AUTH_COLLECTION_PROPERTIES_INVALID
-
AUTH_TOKEN_INVALID
-
AUTH_ENTITY_CREATION_SUCESS
-
AUTH_CATEGORY_INVALID
-
AUTH_BUSINESS_ID_INVALID
-
AUTH_USER_ID_COUNT_EXCEEDED
-
AUTH_COLLECTION_NAME_INVALID
-
AUTH_COLLECTION_PROPERTY_NAME_INVALID
-
AUTH_COLLECTION_PROPERTY_NOT_AVAILABLE
-
AUTH_COLLECTION_ID_INVALID
-
AUTH_USER_ROLE_INVALID
-
AUTH_ROLE_NOT_AVAILABLE
-
AUTH_REFRESH_TOKEN_EXPIRED
-
AUTH_REFRESH_TOKEN_NOT_VALID
-
AUTH_COLLECTION_ALREADY_EXISTS
-
AUTH_COLLECTION_DESCRIPTION_INVALID
-
AUTH_COLLECTION_DOES_NOT_EXIST
-
AUTH_OAUTHCLIENT_CREATE_FAILURE
-
AUTH_OAUTHCLIENT_NAME_INVALID
-
AUTH_OAUTHCLIENT_APPLICATIONTYPE_INVALID
-
AUTH_OAUTHCLIENT_NOTEXISTS
-
AUTH_OAUTHCLIENTS_NOTEXISTS
-
AUTH_OAUTHCLIENT_UPDATE_FAILURE
-
AUTH_OAUTHCLIENT_REDIRECTURL_CANNOTBE_EMPTY
-
AUTH_CLIENT_SECRET_EXPIRED
-
AUTH_CLIENT_AUTHORIZATION_FAILED
-
AUTH_CLIENT_REDIRECT_URI_INVALID
-
AUTH_CLIENT_INVALID_RESPONSE_TYPE
-
AUTH_INVALID_SESSIONID_REFRESHTOKEN
-
AUTH_CLIENT_SESSION_DELETED
-
AUTH_CLIENT_ROLE_INVALID
-
AUTH_CLIENT_ID_INVALID
-
AUTH_CLIENTROLES_NOTFOUND
-
AUTH_CLIENT_ROLE_DELETED
-
AUTH_BUSINESS_ID_MISMATCH
-
AUTH_FEATURE_ROLE_MAPPING_CREATED_SUCCESS
-
AUTH_FEATURE_ROLE_MAPPING_UPDATED_SUCCESS
-
AUTH_FEATURE_ROLE_MAPPING_FOUND
-
AUTH_FEATURE_ROLE_MAPPING_DELETED_SUCCESS
-
AUTH_FEATURESANDPRIVILEGEMAP_CREATED
-
AUTH_FEATURESANDPRIVILEGEMAP_DELETED
-
AUTH_FEATURESANDPRIVILEGEMAP_NOT_FOUND
-
AUTH_AGGREGATED_ACCESS_SUCCESS
-
-
Field Details
-
CLEAR_CACHE_SUCCESS
- See Also:
-
-
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
-
getMessage
public static String getMessage(org.springframework.context.MessageSource messageSource, AuthResponseCodes responseCode) This method return the localized response message using locale context holder.- Parameters:
messageSource
- aMessageSource
object. a message source to load locale specific response messages.responseCode
- aAuthResponseCodes
object. a response code to load locale specific response.- Returns:
- a
String
object. a localized response message.
-
buildResponse
public Object buildResponse(org.springframework.context.MessageSource messageSource, Object responseBody) This method build and return the localized error response as validation error response when response from service is not successful.- Parameters:
messageSource
- aMessageSource
object. a message source for localize the messages.responseBody
- aObject
object. a response body for success- Returns:
- a
Object
object. a actual response from the service to the end point if the response is valid else new validation localized error response.
-