public AttributeSet validateResponsePOST ( final String _authnResponse ) throws SAMLException { final byte [ ] decoded = DatatypeConverter . parseBase64Binary ( _authnResponse ) ; final String authnResponse ; try { authnResponse = new String ( decoded , "UTF-8" ) ; if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( authnResponse ) ; } } catch ( UnsupportedEncodingException e ) { throw new SAMLException ( "UTF-8 is missing, oh well." , e ) ; } final Response response = parseResponse ( authnResponse ) ; try { validatePOST ( response ) ; } catch ( ValidationException e ) { throw new SAMLException ( e ) ; } return getAttributeSet ( response ) ; }
Check an authnResponse and return the subject if validation succeeds . The NameID from the subject in the first valid assertion is returned along with the attributes .