Package com.betfair.cougar.api.security

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


            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

    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

        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

        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

            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

    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

     * @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

TOP

Related Classes of com.betfair.cougar.api.security.IdentityToken

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.