Package com.sun.security.auth

Examples of com.sun.security.auth.UserPrincipal


            throw new NullPointerException("filesystem can't be null");
        }
        this.filesystem = filesystem;

        // TODO manages users & groups in JNode
        owner = new UserPrincipal("root");
        group = new GroupImpl("admins");
        group.addMember(owner);
    }
View Full Code Here


    public ServerSession(Connection connection, SessionDelegate delegate, Binary name, long expiry, ConnectionConfig connConfig)
    {
        super(connection, delegate, name, expiry);
        _connectionConfig = connConfig;       
        _transaction = new AutoCommitTransaction(this.getMessageStore());
        _principal = new UserPrincipal(connection.getAuthorizationID());
        _reference = new WeakReference<Session>(this);
        _id = getConfigStore().createId();
        getConfigStore().addConfiguredObject(this);
    }
View Full Code Here

            sharedState.put(USERNAME_KEY, username);
            sharedState.put(PASSWORD_KEY, password);
        }

        // Create the user principals
        userPrincipal = new UserPrincipal(username);
        if (authzIdentity != null) {
            authzPrincipal = new UserPrincipal(authzIdentity);
        }

        try {

            ldapPrincipal = new LdapPrincipal(dn);
View Full Code Here

      sharedState.put(USERNAME_KEY, username);
      sharedState.put(PASSWORD_KEY, password);
  }

  // Create the user principals
  userPrincipal = new UserPrincipal(username);
  if (authzIdentity != null) {
      authzPrincipal = new UserPrincipal(authzIdentity);
  }

  try {

      ldapPrincipal = new LdapPrincipal(dn);
View Full Code Here

            sharedState.put(USERNAME_KEY, username);
            sharedState.put(PASSWORD_KEY, password);
        }

        // Create the user principals
        userPrincipal = new UserPrincipal(username);
        if (authzIdentity != null) {
            authzPrincipal = new UserPrincipal(authzIdentity);
        }

        try {

            ldapPrincipal = new LdapPrincipal(dn);
View Full Code Here

    if ( username != null && password != null ) {
      currentServer.setCredentials( AuthScope.ANY, new Credentials() {
        @Override
        public Principal getUserPrincipal() {
          return new UserPrincipal( username );
        }

        @Override
        public String getPassword() {
          return password;
View Full Code Here

    public ServerSession(Connection connection, SessionDelegate delegate, Binary name, long expiry, ConnectionConfig connConfig)
    {
        super(connection, delegate, name, expiry);
        _connectionConfig = connConfig;       
        _transaction = new AutoCommitTransaction(this.getMessageStore());
        _principal = new UserPrincipal(connection.getAuthorizationID());
        _reference = new WeakReference(this);
        _id = getConfigStore().createId();
        getConfigStore().addConfiguredObject(this);
    }
View Full Code Here

    if ( username != null && password != null ) {
      currentServer.setCredentials( AuthScope.ANY, new Credentials() {
        @Override
        public Principal getUserPrincipal() {
          return new UserPrincipal( username );
        }

        @Override
        public String getPassword() {
          return password;
View Full Code Here

            sharedState.put(USERNAME_KEY, username);
            sharedState.put(PASSWORD_KEY, password);
        }

        // Create the user principals
        userPrincipal = new UserPrincipal(username);
        if (authzIdentity != null) {
            authzPrincipal = new UserPrincipal(authzIdentity);
        }

        try {

            ldapPrincipal = new LdapPrincipal(dn);
View Full Code Here

            final DefaultOAuth1Provider defProvider = (DefaultOAuth1Provider) provider;
            Assert.assertEquals("http://consumer/callback/homer", defProvider.getRequestToken(token).getCallbackUrl());

            final String verifier = defProvider.authorizeToken(
                    defProvider.getRequestToken(token),
                    new UserPrincipal("homer"),
                    Sets.newHashSet("user"));
            return verifier;
        }
View Full Code Here

TOP

Related Classes of com.sun.security.auth.UserPrincipal

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.