Package com.sun.sgs.impl.auth

Examples of com.sun.sgs.impl.auth.NamePasswordCredentials


        if (!(credentials instanceof NamePasswordCredentials)) {
            throw new CredentialException("Wrong credential class: " +
                    credentials.getClass().getName());
        }
       
        NamePasswordCredentials npc = (NamePasswordCredentials) credentials;
       
        // make sure the name is specified
        if (npc.getName() == null) {
            logger.warning("No name specified");
            throw new CredentialException("Invalid username");
        }

        logger.warning("Auth token: " + npc.getName());

        // unpack the components of the id
        try {
            String username = null;
            String fullname = null;
            String email = null;

            Attributes attrs = auth.getAttributes(npc.getName(), "uid", "cn", "mail");

            Attribute usernameAttr = attrs.get("uid");
            if (usernameAttr != null) {
                username = (String) usernameAttr.get();
            }
View Full Code Here


     */
    public Identity authenticate(String name, String password)
  throws LoginException
    {
  return identityManager.authenticateIdentity(
      new NamePasswordCredentials(name, password.toCharArray()));
    }
View Full Code Here

     */
    public Identity authenticate(String name, String password)
  throws LoginException
    {
  return identityManager.authenticateIdentity(
      new NamePasswordCredentials(name, password.toCharArray()));
    }
View Full Code Here

     */
    public Identity authenticate(String name, String password)
  throws LoginException
    {
  return identityManager.authenticateIdentity(
      new NamePasswordCredentials(name, password.toCharArray()));
    }
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.auth.NamePasswordCredentials

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.