Examples of authenticate()


Examples of com.google.enterprise.connector.filenet4.FileAuthenticationManager.authenticate()

    FileAuthenticationManager fatm = (FileAuthenticationManager) fs.getAuthenticationManager();

    //    Check FileAuthenticationManager
    SimpleAuthenticationIdentity fai = new SimpleAuthenticationIdentity(
        TestConnection.username, TestConnection.password);
    AuthenticationResponse ar = fatm.authenticate(fai);
    assertEquals(true, ar.isValid());
    assertTrue(ar.getGroups().size() > 0);

    //    Check FileAuthenticationManager for a wrong user
    SimpleAuthenticationIdentity faiWrong = new SimpleAuthenticationIdentity(TestConnection.username, TestConnection.wrongPassword);
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IUserContext.authenticate()

  public AuthenticationResponse authenticate(AuthenticationIdentity id)
      throws RepositoryException {
    IUserContext uc = conn.getUserContext();
    String username = FileUtil.getUserName(id);
    try {
      IUser user = uc.authenticate(username, id.getPassword());
      List<Principal> principalGroups = FileUtil.getPrincipals(
          PrincipalType.UNKNOWN, globalNamespace, user.getGroupNames(),
          CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE);
      return new AuthenticationResponse(true, "", principalGroups);
    } catch (Throwable e) {
View Full Code Here

Examples of com.google.enterprise.connector.spi.AuthenticationManager.authenticate()

   * @throws RepositoryException
   */
  public void testInvalidUser() throws RepositoryException {
    Session session = connector.login();
    AuthenticationManager manager = session.getAuthenticationManager();
    AuthenticationResponse response = manager.authenticate(
        new SimpleAuthenticationIdentity("not a real username"));
    assertFalse(response.isValid());
  }

  /**
 
View Full Code Here

Examples of com.google.gsa.AuthenticationProcessImpl.authenticate()

                    //and should not be used as a content repository that contains documents
                    try {
                        //add support to cookie array
                        rootAuthCookies.clear();
                        rootStatusCode =
                                authProcess.authenticate(request, response,
                                                         rootAuthCookies, url,
                                                         creds, "root");
                        logger.info("Repository authentication - " +
                                    repositoryConfig.getId() +
                                    " completed. Response was " +
View Full Code Here

Examples of com.google.nigori.client.Datastore.authenticate()

  @Test
  public void test() throws NigoriCryptographyException, IOException, UnauthorisedException {
    Datastore nigori = getStore();
    for (int i = 0; i < AcceptanceTests.REPEAT; ++i) {// check we can do this more than once
      assertTrue("Not registered", nigori.register());
      assertTrue("Can't authenticate", nigori.authenticate());
      assertTrue("Can't unregister", nigori.unregister());
      assertFalse("Authenticated after unregistration", nigori.authenticate());
      assertFalse("Could re-unregister", nigori.unregister());
    }
  }
View Full Code Here

Examples of com.ibm.sbt.services.endpoints.Endpoint.authenticate()

    try {
      // If the endpoint is not authenticated, then authenticate
      // else redirect the main page
      if (!ep.isAuthenticationValid()) {
        ep.authenticate(true);
      } else {
        generateCloseScript(req, resp);
      }
    } catch (ClientServicesException ex) {
      throw new ServletException(ex);
View Full Code Here

Examples of com.javaeye.user.User.authenticate()

    private String oldPassword;
    private String newPassword;

    public String execute() throws Exception {
        User user = RemoteUser.get();
        if (!user.authenticate(oldPassword)) {
            addFieldError("oldPassword", getText("password.NotCorrect"));
            return INPUT;
        }
        user.setPassword(newPassword);
        userManager.store(user);
View Full Code Here

Examples of com.k_int.svc.identity.service.IdentityService.authenticate()

  public boolean authenticateToken(String token) {
    boolean result = false;
    try {
      IdentityService identity_service = (IdentityService) ctx.getBean("IdentityService");
      result = ( identity_service.authenticate(token) != null );
    }
    catch ( com.k_int.svc.identity.service.IdentityServiceException ise ) {
      System.err.println("Identity Service Exception "+ise);
      ise.printStackTrace();
    }
View Full Code Here

Examples of com.khs.sherpa.json.service.Authentication.authenticate()

  protected Object processAuthenication() throws SherpaRuntimeException {
    String userid = request.getParameter("userid");
    String password = request.getParameter("password");
    try {
      Authentication authentication = new Authentication(applicationContext);
      SessionToken token = authentication.authenticate(userid, password, request, response);
     
      boolean hasAdminRole = applicationContext.getManagedBean(SessionTokenService.class)
        .hasRole(token.getUserid(), token.getToken(), (String) applicationContext.getAttribute(ApplicationContext.SETTINGS_ADMIN_USER));
     
      // load the sherpa admin user
View Full Code Here

Examples of com.loja.security.Authenticator.authenticate()

    authenticator.setEntityManager(em);
    authenticator.setCredentials(credentials);
    authenticator.setIdentity(identity);
    boolean retorno = false;
    try {
      retorno = authenticator.authenticate();
    } catch (Exception e) {
      System.out.println("pau");
    }
    Assert.assertTrue(retorno);
  }
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.