Examples of authenticate()


Examples of org.jdesktop.swingx.auth.LoginService.authenticate()

    String password = "111";
    char[] charPassword = new char[password.length()];
    password.getChars(0, password.length(), charPassword, 0);   
   
    LoginService ls = new ModusLoginService();
    assertTrue(ls.authenticate("1", charPassword, null));
  }

}
View Full Code Here

Examples of org.jtalks.jcommune.plugin.api.core.AuthenticationPlugin.authenticate()

            throws UnexpectedErrorException, NoConnectionException {
        AuthenticationPlugin authPlugin
                = (AuthenticationPlugin) pluginLoader.getPluginByClassName(AuthenticationPlugin.class);
        Map<String, String> authInfo = new HashMap<>();
        if (authPlugin != null && authPlugin.getState() == Plugin.State.ENABLED) {
            authInfo.putAll(authPlugin.authenticate(username, passwordHash));
        }
        return authInfo;
    }

    private JCUser getByUsername(String username) throws NotFoundException {
View Full Code Here

Examples of org.jvnet.glassfish.comms.security.auth.impl.DigestAuthenticator.authenticate()

    private void handleDigestAuthentication(SipServletRequest request, String servletToInvoke, boolean proxy) throws IOException {
        if (!((authMethod == null) || (authMethod.length() == 0))) {
            if ("DIGEST".equals(authMethod)) {
                DigestAuthenticator auth = new DigestAuthenticator(
                        realmName, proxy);
                Principal authPrincipal = auth.authenticate(request);
                if (authPrincipal != null) {
                    ((SipServletRequestImpl) request).setUserPrincipal(authPrincipal);
                    ((SipServletRequestImpl) request).setUser(authPrincipal.getName());
                    ((SipServletRequestImpl) request).setAuthInfoHeader(auth.getAuthInfoHeader());
                    removeProcessedAuthHeader(request, proxy);
View Full Code Here

Examples of org.jvnet.glassfish.comms.security.auth.impl.PAssertedAuthenticator.authenticate()

        TargetTuple remoteHost = ((SipServletRequestImpl) request).getInitialRemote();
        String host = "";
        if (remoteHost != null) {
            host = remoteHost.getIP();
        }
        Principal authPrincipal = auth.authenticate(request, host,
                identityAuthRealm, auth.INTERMEDIATE);
        if (authPrincipal != null) {
            ((SipServletRequestImpl) request).setUserPrincipal(authPrincipal);
            ((SipServletRequestImpl) request).setUser(authPrincipal.getName());
        } else {
View Full Code Here

Examples of org.jvnet.glassfish.comms.security.auth.impl.RunAsAuthenticator.authenticate()

            String servlet) {
        Object currentSC = null;
        if (runAsPrincipals.containsKey(servlet)) {
            String user = runAsPrincipals.get(servlet);
            RunAsAuthenticator ras = new RunAsAuthenticator(user, "");
            ras.authenticate(null);
            currentSC =
                    SipSecurityManager.getSecurityContext();
        }

        return currentSC;
View Full Code Here

Examples of org.jvnet.libpam.PAM.authenticate()

    PAM pam = null;
    try {
      String serviceName = settings.getString(Keys.realm.pam.serviceName, "system-auth");
      pam = new PAM(serviceName);
      pam.authenticate(username, new String(password));
    } catch (PAMException e) {
      logger.error(e.getMessage());
      return null;
    } finally {
      if (pam != null) {
View Full Code Here

Examples of org.modeshape.jcr.security.AuthenticationProviders.authenticate()

        final Credentials anonCredentials = running.anonymousCredentials();
        final Map<String, Object> attributes = new HashMap<String, Object>();

        // Try to authenticate with the provider(s) ...
        ExecutionContext context = running.context();
        ExecutionContext sessionContext = authenticators.authenticate(credentials, repoName, workspaceName, context, attributes);

        if (sessionContext == null && credentials != null && anonCredentials != null) {
            // Failed non-anonymous authentication, so try anonymous authentication ...
            if (logger.isDebugEnabled()) logger.debug(JcrI18n.usingAnonymousUser.text());
            attributes.clear();
View Full Code Here

Examples of org.mortbay.http.Authenticator.authenticate()


            // Handle pre-authenticated request
            if (authenticator != null) {
                // User authenticator.
                user = authenticator.authenticate(realm, pathInContext, request, response);
            } else {
                // don't know how authenticate
                log.warn("Mis-configured Authenticator for " + request.getPath());
                throw new HttpException(HttpResponse.__500_Internal_Server_Error, "Mis-configured Authenticator for " + request.getPath());
            }
View Full Code Here

Examples of org.mortbay.jetty.security.Authenticator.authenticate()

                    && pathInContext.endsWith(FormAuthenticator.__J_SECURITY_CHECK)) {
                /**
                 * This is a post request to __J_SECURITY_CHECK. Stop now after authentication.
                 * Whether or not authentication succeeded, we return.
                 */
                authenticator.authenticate(realm, pathInContext, request, response);
                return false;
            }
            // attempt to access an unprotected resource that is not the
            // j_security_check.
            // if we are logged in, return the logged in principal.
View Full Code Here

Examples of org.mortbay.jetty.security.HashUserRealm.authenticate()

       
        HashUserRealm userRealm = new HashUserRealm();
        userRealm.put("user", "pass");
        userRealm.addUserToRole("user", "role");

        assertNotNull(userRealm.authenticate("user", "pass", null));
       
        sh.setUserRealm(userRealm);
       
        Constraint constraint = new Constraint();
        constraint.setName(Constraint.__BASIC_AUTH);;
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.