Examples of IdentityToken


Examples of com.betfair.cougar.api.security.IdentityToken

    protected void attachCertInfo(List<IdentityToken> credentials, X509Certificate[] certificateChain) throws NamingException {
        // Check if a SSL Common name has appeared
        String sSLCertInfo = findCertInfo(certificateChain);
        if (sSLCertInfo != null) {
            credentials.add(new IdentityToken(SSL_CERT_INFO, sSLCertInfo));
        }
    }
View Full Code Here

Examples of com.betfair.cougar.api.security.IdentityToken

            for (Cookie cookie : cookies) {
                String cookieValue = cookie.getValue();
                String cookieName = cookie.getName();
                for (SimpleIdentityTokenName t: SimpleIdentityTokenName.values()) {
                    if (("X-Token-"+t.name()).equals(cookieName) && cookieValue != null && cookieValue.length() > 0) {
                        tokens.add(new IdentityToken(cookieName, cookieValue));
                    }
                }
            }
        }
        return tokens;
View Full Code Here

Examples of com.betfair.cougar.api.security.IdentityToken

    public List<IdentityToken> resolve(HttpServletRequest input, X509Certificate[] certificateChain) {
        List<IdentityToken> tokens = new ArrayList<IdentityToken>();
        for (SimpleIdentityTokenName t: SimpleIdentityTokenName.values()) {
            String val = input.getHeader("X-AltToken-"+t.name());
            if (val != null && val.length() > 0) {
                tokens.add(new IdentityToken(t.name(), val));
            }
        }
        return tokens;
    }
View Full Code Here

Examples of com.betfair.cougar.api.security.IdentityToken

        for (SimpleIdentityTokenName securityToken : SimpleIdentityTokenName.values()) {

            Header authHeaderValue = input.getFirstHeader(TOKEN_PREFIX + securityToken.name());
            if (authHeaderValue != null) {
                credentials.add(new IdentityToken(securityToken.name(), authHeaderValue.getValue()));
            }
        }

        return credentials;
    }
View Full Code Here

Examples of com.betfair.cougar.api.security.IdentityToken

        List<IdentityToken> credentials = new ArrayList<IdentityToken>();

        for (SimpleIdentityTokenName securityToken : SimpleIdentityTokenName.values()) {
            String authHeaderValue = input.getHeaders().getStringField(TOKEN_PREFIX + securityToken.name());
            if (authHeaderValue != null) {
                credentials.add(new IdentityToken(securityToken.name(), authHeaderValue));
            }
        }

        return credentials;
    }
View Full Code Here

Examples of com.betfair.cougar.api.security.IdentityToken

            throw new CougarFrameworkException("Unable to resolve cert info", ne);
        }
        for (SimpleIdentityTokenName t: SimpleIdentityTokenName.values()) {
            String val = input.getHeader("X-Token-"+t.name());
            if (val != null && val.length() > 0) {
                tokens.add(new IdentityToken(t.name(), val));
            }
        }
        return tokens;
    }
View Full Code Here

Examples of com.betfair.cougar.api.security.IdentityToken

    if (input != null) {
      for (Iterator i = input.getChildElements(); i.hasNext();) {
        OMElement element = (OMElement) i.next();
                for (SimpleIdentityTokenName t: SimpleIdentityTokenName.values()) {
                    if (element.getLocalName().equalsIgnoreCase(t.name())) {
                        tokens.add(new IdentityToken(t.name(), element.getText()));
                        break;

                    }
                }
      }
View Full Code Here

Examples of com.betfair.cougar.api.security.IdentityToken

     * @return IdentityChain
     */
    public IdentityChain setCtxIdentity(Map<String,String> idtokens){
      final List<IdentityToken> tokens = new ArrayList<IdentityToken>();
      for(Map.Entry<String, String> entry: idtokens.entrySet()){
        tokens.add(new IdentityToken(entry.getKey(), entry.getValue()));
      }
      try {
        IdentityChain idChain = new IdentityChainImpl();
            IDENTITY_RESOLVER.resolve(idChain, new ExecutionContextWithTokens() {
                @Override
View Full Code Here

Examples of org.apache.jetspeed.security.activeauthentication.IdentityToken

        if (authenticationConfiguration.isCreateNewSessionOnLogin())
        {
   
            ActiveAuthenticationIdentityProvider identityProvider = (ActiveAuthenticationIdentityProvider)
                Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.security.activeauthentication.ActiveAuthenticationIdentityProvider");
            IdentityToken token = identityProvider.createIdentityToken(username);
            saveState(session, token, identityProvider.getSessionAttributeNames());
            request.getSession().invalidate();
            HttpSession newSession = request.getSession(true);
            restoreState(newSession, token);
            response.sendRedirect(response.encodeURL(request.getContextPath()
                    + "/login/redirector?token=") + token.getToken());
           
        }
        else
        {
            response.sendRedirect(response.encodeURL(request.getContextPath()
View Full Code Here

Examples of org.apache.jetspeed.security.activeauthentication.IdentityToken

        if (authenticationConfiguration.isCreateNewSessionOnLogin())
        {
   
            ActiveAuthenticationIdentityProvider identityProvider = (ActiveAuthenticationIdentityProvider)
                Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.security.activeauthentication.ActiveAuthenticationIdentityProvider");
            IdentityToken token = identityProvider.createIdentityToken(username);
            saveState(session, token, identityProvider.getSessionAttributeNames());
            request.getSession().invalidate();
            HttpSession newSession = request.getSession(true);
            restoreState(newSession, token);
            response.sendRedirect(response.encodeURL(request.getContextPath()
                    + "/login/redirector?token=") + token.getToken());
           
        }
        else
        {
            response.sendRedirect(response.encodeURL(request.getContextPath()
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.