Examples of MacAuthorizationScheme


Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ClientException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ClientException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ClientWebApplicationException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ClientWebApplicationException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ProcessingException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ClientWebApplicationException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ClientException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ClientException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

            sb.append(token.getTokenKey());
        } else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
            if (httpProps == null) {
                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macSecret = token.getParameters().get(OAuthConstants.MAC_TOKEN_SECRET);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macSecret));
        } else {
            throw new ClientWebApplicationException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.mac.MacAuthorizationScheme

   
    private static String getClientAuthHeader(MacAccessToken macAccessToken) {
        String address = "http://localhost:8080/appContext/oauth2/testResource";
        HttpRequestProperties props = new HttpRequestProperties(URI.create(address), "GET");
       
        return new MacAuthorizationScheme(props, macAccessToken)
            .toAuthorizationHeader(macAccessToken.getMacAlgorithm(),
                                   macAccessToken.getMacSecret());
    }
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.