mitreid-connect
公開メンバ関数 | 静的非公開変数類 | 全メンバ一覧
org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl クラス
org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl 連携図
Collaboration graph

公開メンバ関数

void testFullToken ()
 
void testNullExp ()
 
void testNullScopes ()
 
void testNullScopesNullExp ()
 

静的非公開変数類

static String tokenString = "thisisatokenstring"
 
static Set< String > scopes = ImmutableSet.of("bar", "foo")
 
static String scopeString = "foo bar"
 
static Date exp = new Date(123 * 1000L)
 
static Long expVal = 123L
 

詳解

関数詳解

◆ testFullToken()

void org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.testFullToken ( )
inline
43  {
44 
45 
46  JsonObject tokenObj = new JsonObject();
47  tokenObj.addProperty("active", true);
48  tokenObj.addProperty("scope", scopeString);
49  tokenObj.addProperty("exp", expVal);
50  tokenObj.addProperty("sub", "subject");
51  tokenObj.addProperty("client_id", "123-456-789");
52 
53  OAuth2AccessTokenImpl tok = new OAuth2AccessTokenImpl(tokenObj, tokenString);
54 
55  assertThat(tok.getScope(), is(equalTo(scopes)));
56  assertThat(tok.getExpiration(), is(equalTo(exp)));
57  }
static String scopeString
Definition: TestOAuth2AccessTokenImpl.java:37
static Long expVal
Definition: TestOAuth2AccessTokenImpl.java:40
static Set< String > scopes
Definition: TestOAuth2AccessTokenImpl.java:36
static Date exp
Definition: TestOAuth2AccessTokenImpl.java:39
static String tokenString
Definition: TestOAuth2AccessTokenImpl.java:34

◆ testNullExp()

void org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.testNullExp ( )
inline
60  {
61 
62 
63  JsonObject tokenObj = new JsonObject();
64  tokenObj.addProperty("active", true);
65  tokenObj.addProperty("scope", scopeString);
66  tokenObj.addProperty("sub", "subject");
67  tokenObj.addProperty("client_id", "123-456-789");
68 
69  OAuth2AccessTokenImpl tok = new OAuth2AccessTokenImpl(tokenObj, tokenString);
70 
71  assertThat(tok.getScope(), is(equalTo(scopes)));
72  assertThat(tok.getExpiration(), is(equalTo(null)));
73  }
static String scopeString
Definition: TestOAuth2AccessTokenImpl.java:37
static Set< String > scopes
Definition: TestOAuth2AccessTokenImpl.java:36
static String tokenString
Definition: TestOAuth2AccessTokenImpl.java:34

◆ testNullScopes()

void org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.testNullScopes ( )
inline
76  {
77 
78 
79  JsonObject tokenObj = new JsonObject();
80  tokenObj.addProperty("active", true);
81  tokenObj.addProperty("exp", expVal);
82  tokenObj.addProperty("sub", "subject");
83  tokenObj.addProperty("client_id", "123-456-789");
84 
85  OAuth2AccessTokenImpl tok = new OAuth2AccessTokenImpl(tokenObj, tokenString);
86 
87  assertThat(tok.getScope(), is(equalTo(Collections.EMPTY_SET)));
88  assertThat(tok.getExpiration(), is(equalTo(exp)));
89  }
static Long expVal
Definition: TestOAuth2AccessTokenImpl.java:40
static Date exp
Definition: TestOAuth2AccessTokenImpl.java:39
static String tokenString
Definition: TestOAuth2AccessTokenImpl.java:34

◆ testNullScopesNullExp()

void org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.testNullScopesNullExp ( )
inline
92  {
93 
94 
95  JsonObject tokenObj = new JsonObject();
96  tokenObj.addProperty("active", true);
97  tokenObj.addProperty("sub", "subject");
98  tokenObj.addProperty("client_id", "123-456-789");
99 
100  OAuth2AccessTokenImpl tok = new OAuth2AccessTokenImpl(tokenObj, tokenString);
101 
102  assertThat(tok.getScope(), is(equalTo(Collections.EMPTY_SET)));
103  assertThat(tok.getExpiration(), is(equalTo(null)));
104  }
static String tokenString
Definition: TestOAuth2AccessTokenImpl.java:34

メンバ詳解

◆ exp

Date org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.exp = new Date(123 * 1000L)
staticprivate

◆ expVal

Long org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.expVal = 123L
staticprivate

◆ scopes

Set<String> org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.scopes = ImmutableSet.of("bar", "foo")
staticprivate

◆ scopeString

String org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.scopeString = "foo bar"
staticprivate

◆ tokenString

String org.mitre.oauth2.introspectingfilter.TestOAuth2AccessTokenImpl.tokenString = "thisisatokenstring"
staticprivate

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