gluu
公開メンバ関数 | 全メンバ一覧
org.xdi.oxd.server.UmaGetClaimsGatheringUrlTest クラス
org.xdi.oxd.server.UmaGetClaimsGatheringUrlTest 連携図
Collaboration graph

公開メンバ関数

void test (String host, String opHost, String redirectUrl, String rsProtect) throws IOException
 

詳解

著者
yuriyz

関数詳解

◆ test()

void org.xdi.oxd.server.UmaGetClaimsGatheringUrlTest.test ( String  host,
String  opHost,
String  redirectUrl,
String  rsProtect 
) throws IOException
inline
26  {
27 
28  ClientInterface client = Tester.newClient(host);
29  RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrl);
30 
31  RsProtectTest.protectResources(client, site, UmaFullTest.resourceList(rsProtect).getResources());
32 
33  final RsCheckAccessResponse checkAccess = RsCheckAccessTest.checkAccess(client, site);
34 
35  final RpGetClaimsGatheringUrlParams params = new RpGetClaimsGatheringUrlParams();
36  params.setOxdId(site.getOxdId());
37  params.setTicket(checkAccess.getTicket());
38  params.setClaimsRedirectUri(redirectUrl);
39 
40  final RpGetClaimsGatheringUrlResponse response = client.umaRpGetClaimsGatheringUrl(Tester.getAuthorization(), params).dataAsResponse(RpGetClaimsGatheringUrlResponse.class);
41 
42  Map<String, String> parameters = CoreUtils.splitQuery(response.getUrl());
43 
44  assertTrue(StringUtils.isNotBlank(parameters.get("client_id")));
45  assertTrue(StringUtils.isNotBlank(parameters.get("ticket")));
46  assertTrue(StringUtils.isNotBlank(parameters.get("state")));
47  assertTrue(StringUtils.isNotBlank(response.getState()));
48  assertEquals(redirectUrl, parameters.get("claims_redirect_uri"));
49  }

このクラス詳解は次のファイルから抽出されました: