Package org.apache.stanbol.commons.security.auth

Examples of org.apache.stanbol.commons.security.auth.PrincipalImpl


  public static final Principal ANONYMOUS = new PrincipalImpl("anonymous");

  public static Subject createSubject(String userName) {
    return new Subject(true,
      Collections.singleton(new PrincipalImpl(userName)), Collections.EMPTY_SET,
      Collections.EMPTY_SET);
  }
View Full Code Here


        password = "";
      }
      try {
        if (authenticationService.authenticateUser(userName, password)) {
          subject.getPrincipals().remove(UserUtil.ANONYMOUS);
          subject.getPrincipals().add(new PrincipalImpl(userName));
          return true;
        } else {
          throw new LoginException(LoginException.PASSWORD_NOT_MATCHING);
        }
      } catch (NoSuchAgent ex) {
View Full Code Here

TOP

Related Classes of org.apache.stanbol.commons.security.auth.PrincipalImpl

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.