Package org.oa4mp.di
Class DIServiceExceptionHandler
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.servlet.OA2ExceptionHandler
-
- org.oa4mp.di.DIServiceExceptionHandler
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.servlet.ExceptionHandler
,OA2Errors
public class DIServiceExceptionHandler extends OA2ExceptionHandler implements OA2Errors
Created by Jeff Gaynor
on 1/29/21 at 10:56 AM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DIServiceExceptionHandler.YAErr
Yet AnotherErr
type object.
-
Field Summary
-
Fields inherited from interface org.oa4mp.delegation.server.OA2Errors
ACCESS_DENIED, ACCOUNT_SELECTION_REQUIRED, CONSENT_REQUIRED, ERROR_URI_PARAMETER, INTERACTION_REQUIRED, INVALID_GRANT, INVALID_REQUEST, INVALID_REQUEST_OBJECT, INVALID_REQUEST_URI, INVALID_SCOPE, INVALID_TARGET, INVALID_TOKEN, LOGIN_REQUIRED, REGISTRATION_NOT_SUPPORTED, REQUEST_NOT_SUPPORTED, REQUEST_URI_NOT_SUPPORTED, SERVER_ERROR, TEMPORARILY_UNAVAILABLE, UNAUTHORIZED_CLIENT, UNSUPPORTED_RESPONSE_TYPE
-
-
Constructor Summary
Constructors Constructor Description DIServiceExceptionHandler(DIService diService, edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleException(edu.uiuc.ncsa.security.servlet.ExceptionHandlerThingie xh)
static DIServiceExceptionHandler.YAErr
lookupErrorCode(String oa2Error)
A practical note is that an awful lot of the errors that OA4MP generates are edge cases (such as a non-existent response_type) or very marginal at best.-
Methods inherited from class org.oa4mp.server.loader.oauth2.servlet.OA2ExceptionHandler
encode, error, getLogger, handleOA2Error, handleOA2Error, handleOA2Error, handleOA2Error, info, warn
-
-
-
-
Constructor Detail
-
DIServiceExceptionHandler
public DIServiceExceptionHandler(DIService diService, edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
-
-
Method Detail
-
handleException
public void handleException(edu.uiuc.ncsa.security.servlet.ExceptionHandlerThingie xh) throws IOException, javax.servlet.ServletException
- Specified by:
handleException
in interfaceedu.uiuc.ncsa.security.servlet.ExceptionHandler
- Overrides:
handleException
in classOA2ExceptionHandler
- Throws:
IOException
javax.servlet.ServletException
-
lookupErrorCode
public static DIServiceExceptionHandler.YAErr lookupErrorCode(String oa2Error)
A practical note is that an awful lot of the errors that OA4MP generates are edge cases (such as a non-existent response_type) or very marginal at best. Generally the OA4MP errors are pretty succinct about what happened. E.g.OA2Errors.INVALID_GRANT
may refer to any of- an expired authorization grant
- an authorization grant that has been invalidated (probably be cause it was used already
- an authorization grant that is legitimately past expiration
- a bogus authorization grant that is unreocognized by the system.
OA2GeneralError
that is thrown. This method will let you override any or all of these messages as you see fit.- Parameters:
oa2Error
-- Returns:
-
-