Examples of CredentialsExpiredException


Examples of org.beangle.security.auth.CredentialsExpiredException

    }
  }

  private class DefaultPostAuthenticationChecker implements UserDetailChecker {
    public void check(UserDetail user) {
      if (user.isCredentialsExpired()) { throw new CredentialsExpiredException(textResource
          .getText("AbstractUserDetailsAuthenticationProvider.credentialsExpired",
              "User credentials have expired"), user); }
    }
View Full Code Here

Examples of org.beangle.security.auth.CredentialsExpiredException

    if (user.isAccountExpired()) { throw new AccountExpiredException(textResource.getText(
        "AbstractUserDetailsAuthenticationProvider.expired", "User account has expired"),
        user); }

    if (user.isCredentialsExpired()) { throw new CredentialsExpiredException(
        textResource.getText(
            "AbstractUserDetailsAuthenticationProvider.credentialsExpired",
            "User credentials have expired"), user); }
  }
View Full Code Here

Examples of org.beangle.security.auth.CredentialsExpiredException

        "AbstractUserDetailsAuthenticationProvider.disabled", "User is disabled"), user); }

    if (user.isAccountExpired()) { throw new AccountExpiredException(textResource.getText(
        "AbstractUserDetailsAuthenticationProvider.expired", "User account has expired"), user); }

    if (user.isCredentialsExpired()) { throw new CredentialsExpiredException(textResource.getText(
        "AbstractUserDetailsAuthenticationProvider.credentialsExpired",
        "User credentials have expired"), user); }
  }
View Full Code Here

Examples of org.springframework.security.authentication.CredentialsExpiredException

    private class DefaultPostAuthenticationChecks implements UserDetailsChecker {
        public void check(UserDetails user) {
            if (!user.isCredentialsNonExpired()) {
                logger.debug("User account credentials have expired");

                throw new CredentialsExpiredException(messages.getMessage(
                        "AbstractUserDetailsAuthenticationProvider.credentialsExpired",
                        "User credentials have expired"), user);
            }
        }
View Full Code Here

Examples of org.springframework.security.authentication.CredentialsExpiredException

    void raiseExceptionForErrorCode(int code, NamingException exception) {
        String hexString = Integer.toHexString(code);
        Throwable cause = new ActiveDirectoryAuthenticationException(hexString, exception.getMessage(), exception);
        switch (code) {
            case PASSWORD_EXPIRED:
                throw new CredentialsExpiredException(messages.getMessage("LdapAuthenticationProvider.credentialsExpired",
                        "User credentials have expired"), cause);
            case ACCOUNT_DISABLED:
                throw new DisabledException(messages.getMessage("LdapAuthenticationProvider.disabled",
                        "User is disabled"), cause);
            case ACCOUNT_EXPIRED:
View Full Code Here

Examples of org.springframework.security.authentication.CredentialsExpiredException

        if (!user.isAccountNonExpired()) {
            throw new AccountExpiredException("User account has expired", user);
        }

        if (!user.isCredentialsNonExpired()) {
            throw new CredentialsExpiredException("User credentials have expired", user);
        }
    }
View Full Code Here

Examples of org.springframework.security.authentication.CredentialsExpiredException

  private long validityWindowSeconds = 60 * 60 * 12; //we'll default to a 12-hour validity window.

  public void validateNonce(ConsumerDetails consumerDetails, long timestamp, String nonce) throws AuthenticationException {
    long nowSeconds = (System.currentTimeMillis() / 1000);
    if ((nowSeconds - timestamp) > getValidityWindowSeconds()) {
      throw new CredentialsExpiredException("Expired timestamp.");
    }
  }
View Full Code Here

Examples of org.springframework.security.authentication.CredentialsExpiredException

  // we'll default to a 10 minute validity window, otherwise the amount of memory used on NONCES can get quite large.
  private long validityWindowSeconds = 60 * 10;

  public void validateNonce(ConsumerDetails consumerDetails, long timestamp, String nonce) {
    if (System.currentTimeMillis() / 1000 - timestamp > getValidityWindowSeconds()) {
      throw new CredentialsExpiredException("Expired timestamp.");
    }

    NonceEntry entry = new NonceEntry(consumerDetails.getConsumerKey(), timestamp, nonce);

    synchronized (NONCES) {
View Full Code Here

Examples of org.springframework.security.authentication.CredentialsExpiredException

                sc = oauthConnector.getAccessToken((String) authToken.getCredentials(), (String) authToken.getDetails());
            }
            return createAuthentication(sc);
        } catch (IOException ie) {
            LOGGER.error("Unable to get access token", ie);
            throw new CredentialsExpiredException("OAuth login invalid or expired access token");
        }
    }
View Full Code Here

Examples of org.springframework.security.authentication.CredentialsExpiredException

    }

    private class DefaultPostAuthenticationChecks implements UserDetailsChecker {
        public void check(UserDetails user) {
            if (!user.isCredentialsNonExpired()) {
                throw new CredentialsExpiredException(messages.getMessage(
                        "AbstractUserDetailsAuthenticationProvider.credentialsExpired",
                        "User credentials have expired"), user);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.