private AuthenticationResult getAuthenticationCredentials ( Boolean supportsPop , Map < String , String > challengeMap ) { String authorization = challengeMap . get ( "authorization" ) ; if ( authorization == null ) { authorization = challengeMap . get ( "authorization_uri" ) ; } String resource = challengeMap . get ( "resource" ) ; String scope = challengeMap . get ( "scope" ) ; String schema = supportsPop ? "pop" : "bearer" ; return doAuthenticate ( authorization , resource , scope , schema ) ; }
Extracts the authentication challenges from the challenge map and calls the authentication callback to get the bearer token and return it .