@ GetMapping ( path = SamlIdPConstants . ENDPOINT_SAML2_SSO_PROFILE_POST_CALLBACK ) protected void handleCallbackProfileRequest ( final HttpServletResponse response , final HttpServletRequest request ) throws Exception { LOGGER . info ( "Received SAML callback profile request [{}]" , request . getRequestURI ( ) ) ; val authnRequest = retrieveSamlAuthenticationRequestFromHttpRequest ( request ) ; if ( authnRequest == null ) { LOGGER . error ( "Can not validate the request because the original Authn request can not be found." ) ; response . setStatus ( HttpServletResponse . SC_FORBIDDEN ) ; return ; } val ticket = CommonUtils . safeGetParameter ( request , CasProtocolConstants . PARAMETER_TICKET ) ; if ( StringUtils . isBlank ( ticket ) ) { LOGGER . error ( "Can not validate the request because no [{}] is provided via the request" , CasProtocolConstants . PARAMETER_TICKET ) ; response . setStatus ( HttpServletResponse . SC_FORBIDDEN ) ; return ; } val authenticationContext = buildAuthenticationContextPair ( request , authnRequest ) ; val assertion = validateRequestAndBuildCasAssertion ( response , request , authenticationContext ) ; val binding = determineProfileBinding ( authenticationContext , assertion ) ; buildSamlResponse ( response , request , authenticationContext , assertion , binding ) ; }
Handle callback profile request .