Examples of SAMLUserAuthentication


Examples of com.google.gsa.valve.saml.authn.SAMLUserAuthentication

     * @param artifact artifact
     *
     * @return the user authentication associated to the artifact (if exists)
     */
    private static SAMLUserAuthentication removeArtifactMap(String artifact) {
        SAMLUserAuthentication userAuthN = null;
        try {
            synchronized (artifactMap) {
                userAuthN = artifactMap.remove(artifact);
            }
        } catch (Exception e) {
View Full Code Here

Examples of com.google.gsa.valve.saml.authn.SAMLUserAuthentication

    private static void createArtifactMap(String artifact, String userName,
                                          long time) {
        try {
            synchronized (artifactMap) {
                artifactMap.put(artifact,
                                new SAMLUserAuthentication(userName, time));
            }

        } catch (Exception e) {
            logger.error("Error when putting artifact in the map");
        }
View Full Code Here

Examples of com.google.gsa.valve.saml.authn.SAMLUserAuthentication

     */
    public static SAMLUserAuthentication consumeArtifact(String artifact) {
        // resolve and consume the artifact
        logger.debug("Consuming artifact (" + artifact + ")");

        SAMLUserAuthentication authentication = removeArtifactMap(artifact);

        if (authentication != null) {
            long age =
                (new Date().getTime() / MSECS_IN_SEC) - authentication.getTime();
            // if expired set to null
            if (age > maxArtifactAge) {
                logger.debug("Artifact is out of date");
                return null;
            }
View Full Code Here

Examples of com.google.gsa.valve.saml.authn.SAMLUserAuthentication

                    String userKey;
                    synchronized (it) {
                        userKey = (String)it.next();
                    }

                    SAMLUserAuthentication userAuthentication;
                    synchronized (cacheArtifactMap) {
                        userAuthentication = cacheArtifactMap.get(userKey);
                    }

                    if (userAuthentication != null) {

                        String userName = userAuthentication.getUserName();
                        long artifactTime = userAuthentication.getTime();

                        logger.debug("Artifact Entry: " + userKey +
                                     " for user=" + userName + "; time=" +
                                     artifactTime);
                    }
View Full Code Here

Examples of com.google.gsa.valve.saml.authn.SAMLUserAuthentication

                    String userKey;
                    synchronized (it) {
                        userKey = (String)it.next();
                    }

                    SAMLUserAuthentication userAuthentication;
                    synchronized (cacheArtifactMap) {
                        userAuthentication = cacheArtifactMap.get(userKey);
                    }

                    if (userAuthentication != null) {

                        long artifactTime = userAuthentication.getTime();

                        long time = new Date().getTime() / MSECS_IN_SEC;

                        long delayTime = time - maxArtifactAge;
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.