Package com.caucho.security

Examples of com.caucho.security.BasicPrincipal


   */
  protected PasswordUser createUser(String name, String value)
  {
    String []values = value.trim().split("[,]");

    Principal principal = new BasicPrincipal(name);

    if (values.length < 1) {
      return new PasswordUser(principal, new char[0],
            true, false,
            new String[0]);
View Full Code Here


  public PasswordUser(String user,
          char []password,
          String []roles)
  {
    this(new BasicPrincipal(user), password, false, false, roles);
  }
View Full Code Here

  }

  public PasswordUser(String user,
          char []password)
  {
    this(new BasicPrincipal(user), password,
   false, false, new String[] { "user" });
  }
View Full Code Here

   false, false, new String[] { "user" });
  }

  public PasswordUser(String user, String password)
  {
    this(new BasicPrincipal(user), password.toCharArray(),
   false, false, new String[] { "user" });
  }
View Full Code Here

                                             this));
    }
    else if (credentials instanceof String) {
      String password = (String) credentials;
   
      Principal user = new BasicPrincipal(uid);
      PasswordCredentials pwdCred = new PasswordCredentials(password);
   
      if (auth.authenticate(user, pwdCred, null) == null) {
        throw new NotAuthorizedException(L.l("'{0}' has invalid credentials",
                                             uid));
View Full Code Here

  public void setRunAs(RunAs runAs)
  {
    String roleName = runAs.getRoleName();

    if (roleName != null)
      _runAs = new BasicPrincipal(roleName);
  }
View Full Code Here

      throw new IllegalArgumentException();

    if (! _webApp.isInitializing())
      throw new IllegalStateException();

    _runAs = new BasicPrincipal(roleName);
  }
View Full Code Here

  public PasswordUser(String user,
          char []password,
          String []roles)
  {
    this(new BasicPrincipal(user), password, false, false, roles);
  }
View Full Code Here

  }

  public PasswordUser(String user,
          char []password)
  {
    this(new BasicPrincipal(user), password,
   false, false, new String[] { "user" });
  }
View Full Code Here

TOP

Related Classes of com.caucho.security.BasicPrincipal

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.