@Test public void testHeaderResponse() throws Exception { HttpServletRequest request = createMock(HttpServletRequest.class); OAuthResponse oAuthResponse = OAuthASResponse.authorizationResponse(request,400).setCode("oauth_code") .setState("state_ok") .buildHeaderMessage(); String header = oAuthResponse.getHeader(OAuth.HeaderType.WWW_AUTHENTICATE); assertEquals("Bearer code=\"oauth_code\",state=\"state_ok\"", header); header = oAuthResponse.getHeaders().get(OAuth.HeaderType.WWW_AUTHENTICATE); assertEquals("Bearer code=\"oauth_code\",state=\"state_ok\"", header); }
public static OAuthAuthorizationResponseBuilder authorizationResponse(HttpServletRequest request,int code) { return new OAuthAuthorizationResponseBuilder(request,code); }
OAuthASResponse extends OAuthResponse { public static OAuthAuthorizationResponseBuilder authorizationResponse(HttpServletRequest request,int code) { return new OAuthAuthorizationResponseBuilder(request,code); } }
OAuthASResponse extends OAuthResponse { public static OAuthAuthorizationResponseBuilder authorizationResponse(HttpServletRequest request,int code) { return new OAuthAuthorizationResponseBuilder(request,code); } protected  OAuthASResponse(String uri, int responseStatus); }
OAuthASResponse extends OAuthResponse { public static OAuthAuthorizationResponseBuilder authorizationResponse(HttpServletRequest request,int code) { return new OAuthAuthorizationResponseBuilder(request,code); } protected  OAuthASResponse(String uri, int responseStatus); static OAuthAuthorizationResponseBuilder authorizationResponse(HttpServletRequest request,int code); static OAuthTokenResponseBuilder tokenResponse(int code); }
OAuthASResponse extends OAuthResponse { public static OAuthAuthorizationResponseBuilder authorizationResponse(HttpServletRequest request,int code) { return new OAuthAuthorizationResponseBuilder(request,code); } protected  OAuthASResponse(String uri, int responseStatus); static OAuthAuthorizationResponseBuilder authorizationResponse(HttpServletRequest request,int code); static OAuthTokenResponseBuilder tokenResponse(int code);  }