@SuppressWarnings("unchecked")
	@Override
	public Authentication authenticate(Authentication authentication) {
		Object details = authentication.getDetails();
		Authentication authenticate = super.authenticate(authentication);
		SecuredUser securedUser = (SecuredUser) authenticate.getPrincipal();
		if (details instanceof HashMap) {
			securedUser.getUser().setTimeZone(((HashMap<String, String>) details).get("user_timezone"));
			securedUser.getUser().setUserLanguage(((HashMap<String, String>) details).get("user_language"));
		} else if (details instanceof LanguageAndTimezone) {
			LanguageAndTimezone languageAndTimeZone = ((LanguageAndTimezone) details);
			securedUser.getUser().setTimeZone(languageAndTimeZone.getTimezone());
			securedUser.getUser().setUserLanguage(languageAndTimeZone.getLanguage());
		}
		// If It's the first time to login
		// means.. If the user info provider is not defaultLoginPlugin..
		if (securedUser.getUser().getId() == null) {
			addNewUserIntoLocal(securedUser);
		}
		return authenticate;
	}
Authenticate the given PreAuthenticatedAuthenticationToken.

If the principal contained in the authentication object is null, the request will be ignored to allow other
providers to authenticate it.

@param authentication
           authentication
@return authorized {@link Authentication}
ngrinder-controller/src/main/java/org/ngrinder/security/NGrinderAuthenticationPreAuthProvider.java