Java 8 AccountLockedException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 AccountLockedException class.

This code example shows how to use the following methods:
    private Map<String, Exception> usernameErrorMap = DEFAULT_USERNAME_ERROR_MAP;
 
 
    static { 
        DEFAULT_USERNAME_ERROR_MAP.put("accountDisabled", new AccountDisabledException("Account disabled"));
        DEFAULT_USERNAME_ERROR_MAP.put("accountLocked", new AccountLockedException("Account locked"));
        DEFAULT_USERNAME_ERROR_MAP.put("badHours", new InvalidLoginTimeException("Invalid logon hours"));
        DEFAULT_USERNAME_ERROR_MAP.put("badWorkstation", new InvalidLoginLocationException("Invalid workstation"));
        DEFAULT_USERNAME_ERROR_MAP.put("passwordExpired", new CredentialExpiredException("Password expired"));
    } 
 
    public SimpleTestUsernamePasswordAuthenticationHandler() { 
        logger.warn( 
                "{} is only to be used in a testing environment.  NEVER enable this in a production environment.", 
                getName()); 
    } 
 
    public void setUsernameErrorMap(final Map<String, Exception> map) {
        this.usernameErrorMap = map;
    } 
4
CodeRank
See Code Examples for Java 8 AccountLockedException Methods: