@Test public void testAuthzResponseWithState() throws Exception { HttpServletRequest request = createMock(HttpServletRequest.class); expect(request.getParameter(OAuth.OAUTH_STATE)).andStubReturn("ok"); replay(request); OAuthResponse oAuthResponse = OAuthASResponse.authorizationResponse(request,200) .location("http: .setCode("code") .setParam("testValue", "value2") .buildQueryMessage(); String url = oAuthResponse.getLocationUri(); assertEquals("http: assertEquals(200, oAuthResponse.getResponseStatus()); }
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);  }