private boolean isSubjectValid ( Subject subject ) { final WSCredential wsCred = getWSCredentialFromSubject ( subject ) ; if ( wsCred == null ) { return false ; } else { // TODO revisit this when EJBs are supported add additional // checks would be required return ! wsCred . isUnauthenticated ( ) && ! wsCred . isBasicAuth ( ) ; } }
Check if the subject has a WScredential is authenticated and is not a basic auth credential .