web/src/main/java/org/springframework/security/web/authentication/preauth/websphere/DefaultWASUsernameAndGroupsExtractor.java
private static String getSecurityName(final Subject subject) {
		if (logger.isDebugEnabled()) {
			logger.debug("Determining Websphere security name for subject " + subject);
		}
		String userSecurityName = null;
		if (subject != null) {
			// SEC-803
			Object credential = subject.getPublicCredentials(getWSCredentialClass())
					.iterator().next();
			if (credential != null) {
				userSecurityName = (String) invokeMethod(getSecurityNameMethod(),
						credential);
			}
		}
		if (logger.isDebugEnabled()) {
			logger.debug("Websphere security name is " + userSecurityName
					+ " for subject " + subject);
		}
		return userSecurityName;
	}
private static String getSecurityName(final Subject subject) {
		if (logger.isDebugEnabled()) {
			logger.debug("Determining Websphere security name for subject " + subject);
		}
		String userSecurityName = null;
		if (subject != null) {
			// SEC-803
			Object credential = subject.getPublicCredentials(getWSCredentialClass())
					.iterator().next();
			if (credential != null) {
				userSecurityName = (String) invokeMethod(getSecurityNameMethod(),
						credential);
			}
		}
		if (logger.isDebugEnabled()) {
			logger.debug("Websphere security name is " + userSecurityName
					+ " for subject " + subject);
		}
		return userSecurityName;
	}
private static String getSecurityName ( final Subject subject ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Determining Websphere security name for subject " + subject ) ; } String userSecurityName = null ; if ( subject != null ) { // SEC-803 Object credential = subject . getPublicCredentials ( getWSCredentialClass ( ) ) . iterator ( ) . next ( ) ; if ( credential != null ) { userSecurityName = ( String ) invokeMethod ( getSecurityNameMethod ( ) , credential ) ; } } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Websphere security name is " + userSecurityName + " for subject " + subject ) ; } return userSecurityName ; }
Get the security name for the given subject.

@param subject The subject for which to retrieve the security name
@return String the security name for the given subject
Get the security name for the given subject .