Package org.picketlink.idm.impl.api.model

Examples of org.picketlink.idm.impl.api.model.SimpleUser


        }

        try {
            getLoginContext().login();
            setStatus(AuthenticationStatus.SUCCESS);
            setUser(new SimpleUser(credentials.getUsername())); //SEAMSECURITY-98
        } catch (LoginException e) {
            setStatus(AuthenticationStatus.FAILURE);
            log.error("JAAS authentication failed", e);
        }
    }
View Full Code Here


    @Override
    public void authenticate() {
        if ("test".equals(creds.getUsername())) {
            this.setStatus(AuthenticationStatus.SUCCESS);
            this.setUser(new SimpleUser("test"));
        }
    }
View Full Code Here

    @Inject
    Identity identity;

    public void authenticate() {
        if (identitySession != null) {
            User u = new SimpleUser(credentials.getUsername());

            try {
                boolean success = identitySession.getAttributesManager().validateCredentials(
                        u, new Credential[]{credentials.getCredential()});
View Full Code Here

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (IdentityException e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

    @Override
    public void authenticate() {
        if (credentials.getCredential() instanceof PasswordCredential
                && ((PasswordCredential) credentials.getCredential()).getValue().equals("secret")) {
            this.setStatus(AuthenticationStatus.SUCCESS);
            this.setUser(new SimpleUser(credentials.getUsername()));
        }
    }
View Full Code Here

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (Exception e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (Exception e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (Exception e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

      if ("demo".equals(credentials.getUsername()) &&
            credentials.getCredential() instanceof PasswordCredential &&
            "demo".equals(((PasswordCredential) credentials.getCredential()).getValue()))
      {
         setStatus(AuthenticationStatus.SUCCESS);
         setUser(new SimpleUser("demo"));
      }
      else
      {
         setStatus(AuthenticationStatus.FAILURE);
      }
View Full Code Here

            setStatus(AuthenticationStatus.FAILURE);
            log.info("Demo login for user (" + username + ") failed: wrong username/password.");
            return;
        }
        setStatus(AuthenticationStatus.SUCCESS);
        setUser(new SimpleUser(username));
        log.info("Demo login for user (" + username + ") succeeded.");
    }
View Full Code Here

TOP

Related Classes of org.picketlink.idm.impl.api.model.SimpleUser

Copyright © 2018 www.massapicom. 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.