Package org.oa4mp.di

Class 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

    • 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 interface edu.uiuc.ncsa.security.servlet.ExceptionHandler
        Overrides:
        handleException in class OA2ExceptionHandler
        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.
        This will be disambiguated in the description of the OA2GeneralError that is thrown. This method will let you override any or all of these messages as you see fit.
        Parameters:
        oa2Error -
        Returns: