Package org.apache.jackrabbit.oak.spi.security.authentication

Examples of org.apache.jackrabbit.oak.spi.security.authentication.AuthInfoImpl


        ContentSession cs = null;
        try {
            SimpleCredentials sc = (SimpleCredentials) getAdminCredentials();
            sc.setAttribute(".token", "");

            ImpersonationCredentials ic = new ImpersonationCredentials(sc, new AuthInfoImpl(((SimpleCredentials) getAdminCredentials()).getUserID(), Collections.<String, Object>emptyMap(), Collections.<Principal>emptySet()));
            cs = login(ic);

            Object token = sc.getAttribute(".token").toString();
            assertNotNull(token);
            TokenCredentials tc = new TokenCredentials(token.toString());
View Full Code Here


            SimpleCredentials sc = (SimpleCredentials) getAdminCredentials();
            sc.setAttribute(".token", "");
            sc.setAttribute(".token.mandatory", "something");
            sc.setAttribute("attr", "val");

            ImpersonationCredentials ic = new ImpersonationCredentials(sc, new AuthInfoImpl(((SimpleCredentials) getAdminCredentials()).getUserID(), Collections.<String, Object>emptyMap(), Collections.<Principal>emptySet()));
            cs = login(ic);

            AuthInfo ai = cs.getAuthInfo();
            Set<String> attrNames = ImmutableSet.copyOf(ai.getAttributeNames());
            assertTrue(attrNames.contains("attr"));
View Full Code Here

            Map<String, Object> attributes = new HashMap<String, Object>();
            Map<String, String> publicAttributes = tokenInfo.getPublicAttributes();
            for (String attrName : publicAttributes.keySet()) {
                attributes.put(attrName, publicAttributes.get(attrName));
            }
            return new AuthInfoImpl(tokenInfo.getUserId(), attributes, principals);
        } else {
            return null;
        }
    }
View Full Code Here

            SimpleCredentials sc = (SimpleCredentials) credentials;
            for (String attrName : sc.getAttributeNames()) {
                attributes.put(attrName, sc.getAttribute(attrName));
            }
        }
        return new AuthInfoImpl(userId, attributes, principals);
    }
View Full Code Here

            Map<String, String> publicAttributes = tokenInfo.getPublicAttributes();
            for (String attrName : publicAttributes.keySet()) {
                attributes.put(attrName, publicAttributes.get(attrName));
            }
        }
        return new AuthInfoImpl(userId, attributes, principals);
    }
View Full Code Here

            Map<String, String> publicAttributes = tokenInfo.getPublicAttributes();
            for (String attrName : publicAttributes.keySet()) {
                attributes.put(attrName, publicAttributes.get(attrName));
            }
        }
        return new AuthInfoImpl(userId, attributes, principals);
    }
View Full Code Here

            final SecurityProvider securityProvider, final QueryIndexProvider indexProvider) {

        super(store, hook, workspaceName, SystemSubject.INSTANCE, securityProvider, indexProvider);

        contentSession = new ContentSession() {
            private final AuthInfoImpl authInfo = new AuthInfoImpl(
                    null, null, SystemSubject.INSTANCE.getPrincipals());

            @Override
            public void close() {
            }
View Full Code Here

        ContentSession cs = null;
        try {
            SimpleCredentials sc = (SimpleCredentials) getAdminCredentials();
            sc.setAttribute(".token", "");

            ImpersonationCredentials ic = new ImpersonationCredentials(sc, new AuthInfoImpl(((SimpleCredentials) getAdminCredentials()).getUserID(), Collections.<String, Object>emptyMap(), Collections.<Principal>emptySet()));
            cs = login(ic);

            Object token = sc.getAttribute(".token").toString();
            assertNotNull(token);
            TokenCredentials tc = new TokenCredentials(token.toString());
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.security.authentication.AuthInfoImpl

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.