Examples of LdapPrincipal


Examples of com.sun.security.auth.LdapPrincipal

            authzPrincipal = new UserPrincipal(authzIdentity);
        }

        try {

            ldapPrincipal = new LdapPrincipal(dn);

        } catch (InvalidNameException e) {
            if (debug) {
                System.out.println("\t\t[LdapLoginModule] " +
                                   "cannot create LdapPrincipal: bad DN");
View Full Code Here

Examples of org.apache.directory.server.core.LdapPrincipal

        Modification mod = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
        mods.add( mod );
     
        DN userDn = new DN( "uid=akarasulu,ou=users,ou=system" );
        userDn.normalize( service.getSchemaManager().getAttributeTypeRegistry().getNormalizerMapping() );
        LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
        CoreSession akarasuluSession = service.getSession( principal );

        try
        {
            akarasuluSession.modify(
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal

        StoreUtils.loadExampleData( store, schemaManager );

        evaluatorBuilder = new EvaluatorBuilder( store, schemaManager );
        cursorBuilder = new CursorBuilder( store, evaluatorBuilder );
        directoryService.setSchemaManager( schemaManager );
        session = new MockCoreSession( new LdapPrincipal(), directoryService );

        LOG.debug( "Created new store" );
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal

            return "LdapSession : No Ldap session ...";
        }

        StringBuilder sb = new StringBuilder();

        LdapPrincipal principal = coreSession.getAuthenticatedPrincipal();
        SocketAddress address = coreSession.getClientAddress();

        sb.append( "LdapSession : <" );

        if ( principal != null )
        {
            sb.append( principal.getName() );
            sb.append( "," );
        }

        if ( address != null )
        {
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal

    public MockCoreSession( LdapPrincipal principal, DirectoryService directoryService )
    {
        this.directoryService = directoryService;
        this.authenticatedPrincipal = principal;
        this.anonymousPrincipal = new LdapPrincipal( directoryService.getSchemaManager() );

        // setup attribute type value
        OBJECT_CLASS_AT = directoryService.getSchemaManager().getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal

        StoreUtils.loadExampleData( store, schemaManager );

        DirectoryService directoryService = new MockDirectoryService();
        directoryService.setSchemaManager( schemaManager );
        session = new MockCoreSession( new LdapPrincipal(), directoryService );

        LOG.debug( "Created new store" );
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal

        {
            principalDn = "";
        }

        Dn userDn = new Dn( service.getSchemaManager(), principalDn );
        LdapPrincipal principal = new LdapPrincipal( service.getSchemaManager(), userDn, AuthenticationLevel.SIMPLE );

        if ( dn == null )
        {
            dn = "";
        }
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal

        Attribute attribute = new DefaultAttribute( "userPassword", "replaced" );

        Modification mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
     
        Dn userDn = new Dn( getService().getSchemaManager(), "uid=akarasulu,ou=users,ou=system" );
        LdapPrincipal principal = new LdapPrincipal( getService().getSchemaManager(), userDn, AuthenticationLevel.SIMPLE );
        CoreSession akarasuluSession = getService().getSession( principal );

        try
        {
            akarasuluSession.modify( new Dn( "uid=admin,ou=system" ), mod );
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal

            new DefaultEntry( getService().getSchemaManager(), akarasulu.getEntry() ) );

        try
        {
            Dn userDn = new Dn( getService().getSchemaManager(), "uid=akarasulu,ou=users,ou=system" );
            LdapPrincipal principal = new LdapPrincipal( getService().getSchemaManager(), userDn, AuthenticationLevel.SIMPLE );
            CoreSession akarasuluSession = getService().getSession( principal );

            ExprNode filter = FilterParser.parse( getService().getSchemaManager(), "(objectClass=*)" );
            Cursor<Entry> cursor = akarasuluSession.search( new Dn( "ou=users,ou=system" ), SearchScope.OBJECT, filter , AliasDerefMode.DEREF_ALWAYS );
           
View Full Code Here

Examples of org.apache.directory.server.core.api.LdapPrincipal


    public MockOperation( SchemaManager schemaManager, int count ) throws Exception
    {
        this.count = count;
        this.session = new MockCoreSession( new LdapPrincipal( schemaManager, new Dn( schemaManager ),
            AuthenticationLevel.STRONG ),
            new MockDirectoryService( count ) );
       
        this.schemaManager = schemaManager;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.