protected boolean handleAuthHeader ( GMS . GmsHeader gms_hdr , AuthHeader auth_hdr , Message msg ) { if ( needsAuthentication ( gms_hdr ) ) { if ( this . auth_token . authenticate ( auth_hdr . getToken ( ) , msg ) ) return true ; // authentication passed, send message up the stack else { log . warn ( "%s: failed to validate AuthHeader (token: %s) from %s; dropping message and sending " + "rejection message" , local_addr , auth_token . getClass ( ) . getSimpleName ( ) , msg . src ( ) ) ; sendRejectionMessage ( gms_hdr . getType ( ) , msg . getSrc ( ) , "authentication failed" ) ; return false ; } } return true ; }
Handles a GMS header