/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final String id, final Credential c) { setUser(new User(id)); setCredential(c); }
/** * Check for the presence of account state warnings. * * @return true if account state warnings exist */ public boolean hasAccountStateWarning() { final AccountState state = authenticationResponse.getAccountState(); return state != null ? state.getWarning() != null : false; }
/** * Check for the presence of account state errors. * * @return true if account state errors exist */ public boolean hasAccountStateError() { final AccountState state = authenticationResponse.getAccountState(); return state != null ? state.getError() != null : false; }
/** * Authenticate the user in the supplied request. * * @param request authentication request * * @return response containing the ldap entry of the user authenticated * * @throws LdapException if an LDAP error occurs */ public AuthenticationResponse authenticate(final AuthenticationRequest request) throws LdapException { return authenticate(resolveDn(request.getUser()), request); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user * @param attrs attributes to return */ public AuthenticationRequest(final String id, final Credential c, final String... attrs) { setUser(new User(id)); setCredential(c); setReturnAttributes(attrs); }
/** * Creates a new authenticator. * * @param resolver dn resolver * @param handler authentication handler */ public Authenticator(final DnResolver resolver, final AuthenticationHandler handler) { setDnResolver(resolver); setAuthenticationHandler(handler); }
/** * Creates a new authentication request. * * @param u that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final User u, final Credential c) { setUser(u); setCredential(c); }
/** * Creates a new pooled search dn resolver. * * @param cf connection factory */ public PooledSearchDnResolver(final PooledConnectionFactory cf) { setConnectionFactory(cf); }
/** * Creates a new aggregate authentication handler. * * @param handlers authentication handlers */ public AuthenticationHandler(final Map<String, org.ldaptive.auth.AuthenticationHandler> handlers) { setAuthenticationHandlers(handlers); }
/** * Creates a new freeipa account state. * * @param exp account expiration * @param remaining number of logins available */ public FreeIPAAccountState(final ZonedDateTime exp, final int remaining) { super(new AccountState.DefaultWarning(exp, remaining)); fError = null; }
/** * Creates a new search dn resolver. * * @param cf connection factory */ public SearchDnResolver(final ConnectionFactory cf) { setConnectionFactory(cf); }
/** * Creates a new aggregate entry resolver. * * @param resolvers entry resolvers */ public EntryResolver(final Map<String, org.ldaptive.auth.EntryResolver> resolvers) { setEntryResolvers(resolvers); }
/** * Creates a new bind authentication handler. * * @param cf connection factory */ public BindAuthenticationHandler(final ConnectionFactory cf) { setConnectionFactory(cf); }
/** * Returns the password scheme. * * @return password scheme */ public String getPasswordScheme() { return passwordScheme.toString(); }
/** * Sets the password scheme. * * @param s password scheme */ public void setPasswordScheme(final String s) { passwordScheme = new Scheme(s); }
/** * Authenticate the user in the supplied request. * * @param request authentication request * * @return response containing the ldap entry of the user authenticated * * @throws LdapException if an LDAP error occurs */ public AuthenticationResponse authenticate(final AuthenticationRequest request) throws LdapException { return authenticate(resolveDn(request.getUser()), request); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user * @param attrs attributes to return */ public AuthenticationRequest(final String id, final Credential c, final String... attrs) { setUser(new User(id)); setCredential(c); setReturnAttributes(attrs); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final String id, final Credential c) { setUser(new User(id)); setCredential(c); }
/** * Creates a new authentication request. * * @param id that identifies the user * @param c credential to authenticate the user */ public AuthenticationRequest(final String id, final Credential c) { setUser(id); setCredential(c); }
/** * Creates a new active directory account state. * * @param exp account expiration */ public ActiveDirectoryAccountState(final Calendar exp) { super(new AccountState.DefaultWarning(exp, -1)); adError = null; }