Class PowerAuthExceptionHandler
java.lang.Object
io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthExceptionHandler
Implementation of a PA2.0 Standard RESTful API exception handler.
- Author:
- Petr Dvorak, petr@wultra.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPrecedence value that makes sure to apply the filters in the right order. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.getlime.core.rest.model.base.response.ErrorResponseHandle PowerAuthActivationException exceptions.io.getlime.core.rest.model.base.response.ErrorResponseHandle PowerAuthEncryptionException exceptions.io.getlime.core.rest.model.base.response.ErrorResponseHandle PowerAuthTemporaryKeyException exceptions.io.getlime.core.rest.model.base.response.ErrorResponseHandle PowerAuthUpgradeException exceptions.io.getlime.core.rest.model.base.response.ErrorResponseHandlePowerAuthUserInfoExceptionexceptions.io.getlime.security.powerauth.rest.api.model.exception.RecoveryErrorResponseHandle PowerAuthRecoveryException exceptions.io.getlime.core.rest.model.base.response.ErrorResponseHandle PowerAuthSecureVaultException exceptions.io.getlime.core.rest.model.base.response.ErrorResponseHandle PowerAuthAuthenticationException exceptions.
-
Field Details
-
PRECEDENCE
public static final int PRECEDENCEPrecedence value that makes sure to apply the filters in the right order.- See Also:
-
-
Constructor Details
-
PowerAuthExceptionHandler
public PowerAuthExceptionHandler()
-
-
Method Details
-
handleUnauthorizedException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthAuthenticationException.class) @ResponseStatus(UNAUTHORIZED) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handleUnauthorizedException(PowerAuthAuthenticationException ex) Handle PowerAuthAuthenticationException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handleActivationException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthActivationException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handleActivationException(PowerAuthActivationException ex) Handle PowerAuthActivationException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handleRecoveryException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthRecoveryException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.security.powerauth.rest.api.model.exception.RecoveryErrorResponse handleRecoveryException(PowerAuthRecoveryException ex) Handle PowerAuthRecoveryException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handleSecureVaultException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthSecureVaultException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handleSecureVaultException(PowerAuthSecureVaultException ex) Handle PowerAuthSecureVaultException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handlePowerAuthEncryptionException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthEncryptionException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handlePowerAuthEncryptionException(PowerAuthEncryptionException ex) Handle PowerAuthEncryptionException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handlePowerAuthUpgradeException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthUpgradeException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handlePowerAuthUpgradeException(PowerAuthUpgradeException ex) Handle PowerAuthUpgradeException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handlePowerAuthUserInfoException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthUserInfoException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handlePowerAuthUserInfoException(PowerAuthUserInfoException ex) HandlePowerAuthUserInfoExceptionexceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handlePowerAuthTemporaryKeyException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthTemporaryKeyException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handlePowerAuthTemporaryKeyException(PowerAuthTemporaryKeyException ex) Handle PowerAuthTemporaryKeyException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-