All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vii.brillien.services.sso.ldap.LdapPresence Maven / Gradle / Ivy

package com.vii.brillien.services.sso.ldap;

import com.vii.brillien.core.component.sso.SubjectPresence;
import com.vii.brillien.kernel.BrillienException;
import com.vii.brillien.kernel.annotations.PresenceService;
import com.vii.brillien.kernel.annotations.lifecycle.Resident;
import com.vii.brillien.kernel.axiom.sso.Session;

import java.util.List;

/**
 * Reference implementation for a specialized SubjectPresence managing an LDAP provider
 */
@PresenceService
@Resident
public class LdapPresence extends SubjectPresence {

    /*
    Hashtable env = new Hashtable();

        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
        env.put(Context.PROVIDER_URL, "ldap://zanzibar:10389/o=sevenSeas");

        env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
        env.put(Context.SECURITY_CREDENTIALS, "secret");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");

        InitialDirContext ctx = new InitialDirContext(env);

        Attributes attrs = ctx.getAttributes("");
        NamingEnumeration enm = attrs.getAll();
        while (enm.hasMore()) {
            System.out.println(enm.next());
        }
    * */

    @Override
    protected void initiate() throws BrillienException {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected Session innerAuthenticate(String username, String principal) throws BrillienException {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected void innerLogout(Session session) throws BrillienException {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean innerIsAuthenticated(Session session) throws BrillienException {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean innerHasRole(Session session, String roleIdentifier) throws BrillienException {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean innerHasARole(Session session, List roleIdentifiers) throws BrillienException {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean innerHasRoles(Session session, List roleIdentifiers) throws BrillienException {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean innerHasPermission(Session session, String permission) throws BrillienException {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean innerHasAPermission(Session session, List permissions) throws BrillienException {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean innerHasPermissions(Session session, List permissions) throws BrillienException {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy