mitreid-connect
公開メンバ関数 | 全メンバ一覧
org.mitre.oauth2.model.ClientDetailsEntityTest クラス
org.mitre.oauth2.model.ClientDetailsEntityTest 連携図
Collaboration graph

公開メンバ関数

void testClientDetailsEntity ()
 

詳解

著者
jricher

関数詳解

◆ testClientDetailsEntity()

void org.mitre.oauth2.model.ClientDetailsEntityTest.testClientDetailsEntity ( )
inline

Test method for org.mitre.oauth2.model.ClientDetailsEntity#ClientDetailsEntity().

43  {
44  Date now = new Date();
45 
46  ClientDetailsEntity c = new ClientDetailsEntity();
47 
48  c.setClientId("s6BhdRkqt3");
49  c.setClientSecret("ZJYCqe3GGRvdrudKyZS0XhGv_Z45DuKhCUk0gBR1vZk");
50  c.setApplicationType(ClientDetailsEntity.AppType.WEB);
51  c.setRedirectUris(ImmutableSet.of("https://client.example.org/callback", "https://client.example.org/callback2"));
52  c.setClientName("My Example");
53  c.setLogoUri("https://client.example.org/logo.png");
54  c.setSubjectType(ClientDetailsEntity.SubjectType.PAIRWISE);
55  c.setSectorIdentifierUri("https://other.example.net/file_of_redirect_uris.json");
56  c.setTokenEndpointAuthMethod(ClientDetailsEntity.AuthMethod.SECRET_BASIC);
57  c.setJwksUri("https://client.example.org/my_public_keys.jwks");
58  c.setUserInfoEncryptedResponseAlg(JWEAlgorithm.RSA1_5);
59  c.setUserInfoEncryptedResponseEnc(EncryptionMethod.A128CBC_HS256);
60  c.setContacts(ImmutableSet.of("ve7jtb@example.org", "mary@example.org"));
61  c.setRequestUris(ImmutableSet.of("https://client.example.org/rf.txt#qpXaRLh_n93TTR9F252ValdatUQvQiJi5BDub2BeznA"));
62  c.setCreatedAt(now);
63  c.setAccessTokenValiditySeconds(600);
64 
65  assertEquals("s6BhdRkqt3", c.getClientId());
66  assertEquals("ZJYCqe3GGRvdrudKyZS0XhGv_Z45DuKhCUk0gBR1vZk", c.getClientSecret());
67  assertEquals(ClientDetailsEntity.AppType.WEB, c.getApplicationType());
68  assertEquals(ImmutableSet.of("https://client.example.org/callback", "https://client.example.org/callback2"), c.getRedirectUris());
69  assertEquals("My Example", c.getClientName());
70  assertEquals("https://client.example.org/logo.png", c.getLogoUri());
71  assertEquals(ClientDetailsEntity.SubjectType.PAIRWISE, c.getSubjectType());
72  assertEquals("https://other.example.net/file_of_redirect_uris.json", c.getSectorIdentifierUri());
73  assertEquals(ClientDetailsEntity.AuthMethod.SECRET_BASIC, c.getTokenEndpointAuthMethod());
74  assertEquals("https://client.example.org/my_public_keys.jwks", c.getJwksUri());
75  assertEquals(JWEAlgorithm.RSA1_5, c.getUserInfoEncryptedResponseAlg());
76  assertEquals(EncryptionMethod.A128CBC_HS256, c.getUserInfoEncryptedResponseEnc());
77  assertEquals(ImmutableSet.of("ve7jtb@example.org", "mary@example.org"), c.getContacts());
78  assertEquals(ImmutableSet.of("https://client.example.org/rf.txt#qpXaRLh_n93TTR9F252ValdatUQvQiJi5BDub2BeznA"), c.getRequestUris());
79  assertEquals(now, c.getCreatedAt());
80  assertEquals(600, c.getAccessTokenValiditySeconds().intValue());
81 
82  }

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