Class IdentityExceptionHandler
java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
com.irurueta.authserver.authorization.api.web.ProblemJsonExceptionHandler
com.irurueta.authserver.authorization.api.web.social.SignInMethodExceptionHandler
com.irurueta.authserver.authorization.api.web.social.IdentityExceptionHandler
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.MessageSourceAware
@RestControllerAdvice(assignableTypes=IdentitiesApi.class)
public class IdentityExceptionHandler
extends SignInMethodExceptionHandler
Answers the failures of the identities API as
application/problem+json. The last-sign-in-method and step-up
answers are the shared ones of SignInMethodExceptionHandler.-
Field Summary
FieldsFields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger -
Constructor Summary
ConstructorsConstructorDescriptionIdentityExceptionHandler(MfaExceptionHandler mfaExceptionHandler) Creates the handler. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleNotFound(FederatedIdentityNotFoundException exception) Answers an identity the account does not have (another account's identity is answered the same way).Methods inherited from class com.irurueta.authserver.authorization.api.web.social.SignInMethodExceptionHandler
handleInsufficientUserAuthentication, handleLastSignInMethod, respondMethods inherited from class com.irurueta.authserver.authorization.api.web.ProblemJsonExceptionHandler
createResponseEntity, problemResponse, problemResponseMethods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
createProblemDetail, getMessageSource, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodArgumentNotValid, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource
-
Field Details
-
TYPE_BASE
Base of the problem type URNs.- See Also:
-
-
Constructor Details
-
IdentityExceptionHandler
Creates the handler.- Parameters:
mfaExceptionHandler- builds the step-up challenge.
-
-
Method Details
-
handleNotFound
@ExceptionHandler(FederatedIdentityNotFoundException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleNotFound(FederatedIdentityNotFoundException exception) Answers an identity the account does not have (another account's identity is answered the same way).- Parameters:
exception- the failure.- Returns:
- the
404problem detail.
-