Examples of authenticate()


Examples of org.geoserver.security.GeoServerAuthenticationProvider.authenticate()

        UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken("sa","");
        token.setDetails("details");
        assertTrue(provider.supports(token.getClass()));
        assertTrue(!provider.supports(RememberMeAuthenticationToken.class));
       
        Authentication auth = provider.authenticate(token);
        assertNotNull(auth);
        assertEquals("sa", auth.getPrincipal());
        assertNull(auth.getCredentials());
       
        assertEquals("details", auth.getDetails());
View Full Code Here

Examples of org.geoserver.security.auth.GeoServerRootAuthenticationProvider.authenticate()

       
        /// Test root login after master password change
        Authentication auth = new UsernamePasswordAuthenticationToken("root", "geoserver3");
        GeoServerRootAuthenticationProvider authProvider = new GeoServerRootAuthenticationProvider();
        authProvider.setSecurityManager(getSecurityManager());
        auth = authProvider.authenticate(auth);
        assertTrue(auth.isAuthenticated());
       
        auth = new UsernamePasswordAuthenticationToken("root", "abcdefghijk");
        assertNull(authProvider.authenticate(auth));
        assertFalse(auth.isAuthenticated());
View Full Code Here

Examples of org.geoserver.security.ldap.LDAPAuthenticationProvider.authenticate()

                        }
                       
                        LDAPSecurityProvider provider = new LDAPSecurityProvider(getSecurityManager());
                        LDAPAuthenticationProvider authProvider = (LDAPAuthenticationProvider) provider
                                .createAuthenticationProvider(ldapConfig);
                        Authentication authentication = authProvider
                                .authenticate(new UsernamePasswordAuthenticationToken(
                                        username, password));
                        if(authentication == null || !authentication.isAuthenticated()) {
                            throw new AuthenticationException("Cannot authenticate " + username);
                        }
View Full Code Here

Examples of org.glassfish.security.common.FileRealmHelper.authenticate()

            if (adminKeyFile != null) {
                //This is a FileRealm, instantiate it.
                FileRealmHelper helper = new FileRealmHelper(adminKeyFile);

                //Authenticate the old password
                String[] groups = helper.authenticate(programOpts.getUser(), password.toCharArray());
                if (groups == null) {
                    throw new CommandException(strings.get("InvalidCredentials", programOpts.getUser()));
                }
                helper.updateUser(programOpts.getUser(), programOpts.getUser(), newpassword.toCharArray(), null);
                helper.persist();
View Full Code Here

Examples of org.globus.ftp.GridFTPClient.authenticate()

      try {
        GridFTPContactInfo contactInfo = new GridFTPContactInfo(dirURI.getHost(), dirURI.getPort());

        srcClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
        srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
        srcClient.authenticate(gssCred);
        srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
        srcClient.setType(Session.TYPE_ASCII);
        srcClient.changeDir(dirURI.getPath());
              makeExternalConfigurations(srcClient, true);
View Full Code Here

Examples of org.gudy.azureus2.ui.console.UserProfile.authenticate()

  public UserProfile authenticate( String username, String password )
  {
    UserProfile profile = getUser(username);
    if( profile != null)
    {
      if( profile.authenticate( password ) )
        return profile;
    }
    return null;
  }
 
View Full Code Here

Examples of org.huihoo.workflow.store.RealmDatabase.authenticate()

    {
      String username = (String) env.get(WorkflowClient.SECURITY_PRINCIPAL);
      String password = (String) env.get(WorkflowClient.SECURITY_CREDENTIALS);
      SessionManager manager = willow_engine.getSessionManager();
      RealmDatabase realmDatabase = willow_engine.getRealmDatabase();
      WorkflowParticipant participant = realmDatabase.authenticate(username, password);
      if (participant == null)
      {
        throw new WorkflowException("login workflow  engine unsuccessfully.username=" + username + ",password=" + password);
      }
      this.session = manager.createSession();
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.IAuthProvider.authenticate()

    public void testN3AuthProvider() throws Exception {
        N3AuthProvider n3 = new N3AuthProvider();
        n3.setWsEndpoint("http://localhost:8080/axis2/services/TokenService");
       
        IAuthProvider provider = n3;
        UserRoles user = provider.authenticate(SYSTEM_TEST_TOKEN);
        Assert.assertEquals("exolab\\castor", user.getUserID());
    }
}
View Full Code Here

Examples of org.intalio.tempo.workflow.tas.core.N3AuthStrategy.authenticate()

            Property[] p = new Property[2];
            p[0] = new Property( AuthenticationConstants.PROPERTY_USER, "test/system-test");
            p[1] = new Property(AuthenticationConstants.PROPERTY_ROLES, "test/testrole");
           one(ts).getTokenProperties(SYSTEM_TEST_TOKEN);will(returnValue(p));
        }});      
        n3auth.authenticate(credentials);      
       
        final AuthCredentials credentials2 = new AuthCredentials(SYSTEM_TEST_TOKEN);
        credentials2.getAuthorizedUsers().add("intalio\\jan.lategahn@db.com ");
        credentials2.getAuthorizedRoles().add("test/testrole23");
        expect.that(new Expectations(){{
View Full Code Here

Examples of org.jasig.portal.security.ISecurityContext.authenticate()

      // and stores the values in the principals and credentials HashMaps that are
      // passed to the Authentication service.

      // Attempt to authenticate the user
      final long start = System.currentTimeMillis();
      securityContext.authenticate();
      final long elapsed = System.currentTimeMillis() - start;
      // Check to see if the user was authenticated
      if (securityContext.isAuthenticated()) {
         lastAuthentication = authenticationTimes.add(elapsed); // metric
         // Add the authenticated username to the person object
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.