Examples of Callers


Examples of org.apache.geronimo.security.Callers

    public void init() {
        System.out.println("Test Servlet init");
    }

    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        Callers callers = ContextManager.getCallers();
        Subject current = callers.getCurrentCaller();
        Subject next = callers.getNextCaller();
        PrintWriter out = response.getWriter();
        out.println("Current subject: " + current);
        out.println("Next subject:    " + next);
        //this should create the database
        if (csds == null) {
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        this.defaultSubject = defaultSubject;
        this.runAsSource = runAsSource;
    }

    public Object associate(UserIdentity user) {
        Callers oldCallers = ContextManager.getCallers();
        if (user == null) {
            //exit
            ContextManager.setCallers(defaultSubject, defaultSubject);
        } else {
            //enter
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        //TODO reorganize this so it makes more sense.  maybe use an interceptor stack.
        //TODO track resource ref shared and app managed security
        Thread thread = Thread.currentThread();

        ClassLoader oldClassLoader = thread.getContextClassLoader();
        Callers oldCallers = ContextManager.getCallers();
        Subject clientSubject = defaultSubject;
        try {
            thread.setContextClassLoader(classLoader);
            jndiContext.startClient(appClientModuleName, kernel, classLoader);
            Context componentContext = jndiContext.getJndiContext();
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        this.defaultSubject = defaultSubject;
    }

    public Object associate(UserIdentity userIdentity) {
        Subject subject = userIdentity == null? defaultSubject: userIdentity.getSubject();
        Callers callers = ContextManager.getCallers();
        ContextManager.setCallers(subject, subject);
        return callers;
    }
View Full Code Here

Examples of org.apache.geronimo.security.Callers

    @Override
    public void handle(String target, Request baseRequest, HttpServletRequest request,
                       HttpServletResponse response) throws IOException,
            ServletException {
        String old_policy_id = PolicyContext.getContextID();
        Callers oldCallers = ContextManager.getCallers();
        HttpServletRequest oldRequest = PolicyContextHandlerHttpServletRequest.pushContextData(request);
        try {
            PolicyContext.setContextID(policyContextID);

View Full Code Here

Examples of org.apache.geronimo.security.Callers

        //TODO reorganize this so it makes more sense.  maybe use an interceptor stack.
        //TODO track resource ref shared and app managed security
        Thread thread = Thread.currentThread();

        ClassLoader oldClassLoader = thread.getContextClassLoader();
        Callers oldCallers = ContextManager.getCallers();
        Subject clientSubject = defaultSubject;
        try {
            thread.setContextClassLoader(classLoader);
            jndiContext.startClient(appClientModuleName, kernel, classLoader);
            Context componentContext = jndiContext.getJndiContext();
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        this.defaultSubject = defaultSubject;
        this.runAsSource = runAsSource;
    }

    public Object associate(UserIdentity user) {
        Callers oldCallers = ContextManager.getCallers();
        if (user == null) {
            //exit
            ContextManager.setCallers(defaultSubject, defaultSubject);
        } else {
            //enter
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        super(true);
        this.defaultSubject = defaultSubject;
    }

    public void invoke(Request request, Response response) throws IOException, ServletException {
        Callers oldCallers = null;
        boolean setSubject = false;
        if (defaultSubject != null) {
            oldCallers = ContextManager.getCallers();
            setSubject = oldCallers == null || oldCallers.getCurrentCaller() == null;
        }
        if (setSubject) {
            ContextManager.setCallers(defaultSubject, defaultSubject);
            try {
                getNext().invoke(request, response);
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        //TODO reorganize this so it makes more sense.  maybe use an interceptor stack.
        //TODO track resource ref shared and app managed security
        Thread thread = Thread.currentThread();

        ClassLoader oldClassLoader = thread.getContextClassLoader();
        Callers oldCallers = ContextManager.getCallers();
        Subject clientSubject = defaultSubject;
//        LoginContext loginContext = null;
        try {
            thread.setContextClassLoader(classLoader);
            if (callbackHandlerClass != null) {
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        this.defaultSubject = defaultSubject;
    }

    public Object associate(UserIdentity userIdentity) {
        Subject subject = userIdentity == null? defaultSubject: userIdentity.getSubject();
        Callers callers = ContextManager.getCallers();
        ContextManager.setCallers(subject, subject);
        return callers;
    }
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.