Examples of toAuthorizationHeader()


Examples of com.nimbusds.oauth2.sdk.token.BearerAccessToken.toAuthorizationHeader()

    HTTPRequest httpRequest = request.toHTTPRequest();

    assertEquals(HTTPRequest.Method.GET, httpRequest.getMethod());
    assertEquals(endpointURI, httpRequest.getURL().toURI());
    assertNull(httpRequest.getQuery());
    assertEquals(token.toAuthorizationHeader(), httpRequest.getAuthorization());

    request = UserInfoRequest.parse(httpRequest);

    assertEquals(endpointURI, request.getEndpointURI());
    assertEquals(token, request.getAccessToken());
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.token.BearerAccessToken.toAuthorizationHeader()

    HTTPRequest httpRequest = request.toHTTPRequest();

    assertEquals(HTTPRequest.Method.GET, httpRequest.getMethod());
    assertEquals(uri, httpRequest.getURL().toURI());
    assertEquals(accessToken.toAuthorizationHeader(), httpRequest.getAuthorization());

    request = ClientReadRequest.parse(httpRequest);

    assertEquals(uri.toString(), request.getEndpointURI().toString());
    assertEquals(accessToken.getValue(), request.getAccessToken().getValue());
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.tokens.hawk.HawkAuthorizationScheme.toAuthorizationHeader()

                throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
            }
            HawkAuthorizationScheme macAuthData = new HawkAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.HAWK_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.HAWK_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.toAuthorizationHeader()

                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.toAuthorizationHeader()

                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.toAuthorizationHeader()

                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.toAuthorizationHeader()

                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.toAuthorizationHeader()

                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.toAuthorizationHeader()

                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.toAuthorizationHeader()

                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
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.