core/src/main/java/org/springframework/security/authentication/jaas/SecurityContextLoginModule.java
public boolean login() throws LoginException {
		authen = SecurityContextHolder.getContext().getAuthentication();

		if (authen == null) {
			String msg = "Login cannot complete, authentication not found in security context";

			if (ignoreMissingAuthentication) {
				log.warn(msg);

				return false;
			}
			else {
				throw new LoginException(msg);
			}
		}

		return true;
	}
public boolean login() throws LoginException {
		authen = SecurityContextHolder.getContext().getAuthentication();

		if (authen == null) {
			String msg = "Login cannot complete, authentication not found in security context";

			if (ignoreMissingAuthentication) {
				log.warn(msg);

				return false;
			}
			else {
				throw new LoginException(msg);
			}
		}

		return true;
	}
Authenticate the <code>Subject</code> (phase one) by extracting the Spring Security
<code>Authentication</code> from the current <code>SecurityContext</code>.

@return true if the authentication succeeded, or false if this
<code>LoginModule</code> should be ignored.

@throws LoginException if the authentication fails