private String validateAuthn ( String value ) { // for now, if we got here we're validating an authnToken String result = null ; String valueLower = value . toLowerCase ( ) ; do { if ( valueLower . equals ( "saml" ) ) { result = JAXRSClientConstants . SAML_HANDLER ; break ; } if ( valueLower . equals ( "oauth" ) ) { result = JAXRSClientConstants . OAUTH_HANDLER ; break ; } if ( valueLower . equals ( "ltpa" ) ) { result = JAXRSClientConstants . LTPA_HANDLER ; } } while ( false ) ; if ( result == null ) { Tr . warning ( tc , "warn.invalid.authorization.token.type" , value ) ; // CWWKW0061W } return result ; }
validate the value for authnToken key and select appropriate new key Note that the check is not case sensitive .