Package com.esri.gpt.framework.security.principal

Examples of com.esri.gpt.framework.security.principal.User.reset()


        } else {
         
          // establish the user
          identity = "urn:openid:"+identity;
          User user = context.getUser();
          user.reset();
          user.setKey(identity);
          user.setDistinguishedName(identity);
          user.setName(username);
          user.getProfile().setUsername(username);
          if (email.length() > 0) {
View Full Code Here


          // ensure a local reference for the user
          try {
            LocalDao localDao = new LocalDao(context);
            localDao.ensureReferenceToRemoteUser(user);
          } catch (Exception e) {
            user.reset();
            err = "Openid authentication suceeded, creating local user reference failed.";
            LOGGER.log(Level.SEVERE,err,e);
          }
        }
       
View Full Code Here

    boolean bSingleSignOn = false;
    if (!bSingleSignOn) {
     
      // authenticate the user, add the successful login message
      User user = extractRequestContext().getUser();
      user.reset();
      user.setCredentials(getNewUser().getCredentials());
      idAdapter.authenticate(user);
      String[] args = new String[1];
      args[0] = user.getName();
      extractMessageBroker().addSuccessMessage("identity.login.success",args);
View Full Code Here

protected void authenticate(RequestContext context, Credentials credentials)
  throws CredentialsDeniedException, IdentityException, SQLException {
  getLogger().finer("Authenticating user...");
  IdentityAdapter idAdapter = context.newIdentityAdapter();
  User user = context.getUser();
  user.reset();
  user.setCredentials(credentials);
  try {
    idAdapter.authenticate(user);
  } catch(CredentialsDeniedException e) {
    if (credentials instanceof UsernamePasswordCredentials) {
View Full Code Here

              if (ic != null) {
                String samlUsername = ic.getUsernameFromSAMLToken(samlToken);
                RequestContext rc = context.getRequestContext();
                if ((rc != null) && (samlUsername != null)) {
                  User user = rc.getUser();
                  user.reset();
                  user.setCredentials(new UsernameCredential(samlUsername));
                  rc.newIdentityAdapter().authenticate(user);
                  context.getRequestOptions().getTransactionOptions().setPublicationMethod("seditor");

                  expr = "//tcExt:tcSecurity/tcExt:tcSecuredAction[tcExt:status='draft']";
View Full Code Here

  throws AbortProcessingException, Exception  {
  try {
   
    // set the user credentials
    User user = context.getUser();
    user.reset();
    UsernamePasswordCredentials creds = new UsernamePasswordCredentials();
    creds.setUsername(getCredentials().getUsername());
    creds.setPassword(getCredentials().getPassword());
    user.setCredentials(creds);
   
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.