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

公開メンバ関数

void setupClient (String host, String opHost, String redirectUrl, String postLogoutRedirectUrl, String logoutUrl) throws IOException
 

静的公開メンバ関数

static void assertResponse (SetupClientResponse resp)
 
static SetupClientResponse setupClient (ClientInterface client, String opHost, String redirectUrl)
 
static SetupClientResponse setupClient (ClientInterface client, String opHost, String redirectUrl, String postLogoutRedirectUrl, String logoutUri)
 

詳解

著者
Yuriy Zabrovarnyy
バージョン
0.9, 30/03/2017

関数詳解

◆ assertResponse()

static void org.xdi.oxd.server.SetupClientTest.assertResponse ( SetupClientResponse  resp)
inlinestatic
49  {
50  assertNotNull(resp);
51 
52  notEmpty(resp.getOxdId());
53  notEmpty(resp.getClientId());
54  notEmpty(resp.getClientSecret());
55  }

◆ setupClient() [1/3]

void org.xdi.oxd.server.SetupClientTest.setupClient ( String  host,
String  opHost,
String  redirectUrl,
String  postLogoutRedirectUrl,
String  logoutUrl 
) throws IOException
inline
29  {
30  SetupClientResponse resp = setupClient(Tester.newClient(host), opHost, redirectUrl, postLogoutRedirectUrl, logoutUrl);
31  assertResponse(resp);
32 
33  // more specific client setup
34  final SetupClientParams params = new SetupClientParams();
35  params.setOpHost(opHost);
36  params.setAuthorizationRedirectUri(redirectUrl);
37  params.setPost_logout_redirect_uri(postLogoutRedirectUrl);
38  params.setClientFrontchannelLogoutUri(Lists.newArrayList(logoutUrl));
39  params.setRedirectUris(Arrays.asList(redirectUrl));
40  params.setAcrValues(new ArrayList<String>());
41  params.setScope(Lists.newArrayList("openid", "profile"));
42  params.setGrantType(Lists.newArrayList("authorization_code"));
43  params.setResponseTypes(Lists.newArrayList("code"));
44 
45  resp = Tester.newClient(host).setupClient(params).dataAsResponse(SetupClientResponse.class);
46  assertResponse(resp);
47  }
static void assertResponse(SetupClientResponse resp)
Definition: SetupClientTest.java:49
void setupClient(String host, String opHost, String redirectUrl, String postLogoutRedirectUrl, String logoutUrl)
Definition: SetupClientTest.java:29

◆ setupClient() [2/3]

static SetupClientResponse org.xdi.oxd.server.SetupClientTest.setupClient ( ClientInterface  client,
String  opHost,
String  redirectUrl 
)
inlinestatic
57  {
58  return setupClient(client, opHost, redirectUrl, redirectUrl, "");
59  }
void setupClient(String host, String opHost, String redirectUrl, String postLogoutRedirectUrl, String logoutUrl)
Definition: SetupClientTest.java:29

◆ setupClient() [3/3]

static SetupClientResponse org.xdi.oxd.server.SetupClientTest.setupClient ( ClientInterface  client,
String  opHost,
String  redirectUrl,
String  postLogoutRedirectUrl,
String  logoutUri 
)
inlinestatic
61  {
62 
63  final SetupClientParams params = new SetupClientParams();
64  params.setOpHost(opHost);
65  params.setAuthorizationRedirectUri(redirectUrl);
66  params.setPost_logout_redirect_uri(postLogoutRedirectUrl);
67  params.setClientFrontchannelLogoutUri(Lists.newArrayList(logoutUri));
68  params.setScope(Lists.newArrayList("openid", "uma_protection", "profile"));
69  params.setTrustedClient(true);
70  params.setGrantType(Lists.newArrayList(
71  GrantType.AUTHORIZATION_CODE.getValue(),
72  GrantType.CLIENT_CREDENTIALS.getValue()));
73  params.setOxdRpProgrammingLanguage("java");
74 
75  final Command command = new Command(CommandType.SETUP_CLIENT);
76  command.setParamsObject(params);
77 
78  final SetupClientResponse resp = client.setupClient(params).dataAsResponse(SetupClientResponse.class);
79  assertResponse(resp);
80  return resp;
81  }
static void assertResponse(SetupClientResponse resp)
Definition: SetupClientTest.java:49

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