mitreid-connect
公開メンバ関数 | 静的公開変数類 | 非公開変数類 | 全メンバ一覧
org.mitre.oauth2.service.impl.DefaultSystemScopeService クラス
org.mitre.oauth2.service.impl.DefaultSystemScopeService の継承関係図
Inheritance graph
org.mitre.oauth2.service.impl.DefaultSystemScopeService 連携図
Collaboration graph

公開メンバ関数

Set< SystemScopegetAll ()
 
SystemScope getById (Long id)
 
SystemScope getByValue (String value)
 
void remove (SystemScope scope)
 
SystemScope save (SystemScope scope)
 
Set< SystemScopefromStrings (Set< String > scope)
 
Set< String > toStrings (Set< SystemScope > scope)
 
boolean scopesMatch (Set< String > expected, Set< String > actual)
 
Set< SystemScopegetDefaults ()
 
Set< SystemScopegetReserved ()
 
Set< SystemScopegetRestricted ()
 
Set< SystemScopegetUnrestricted ()
 
Set< SystemScoperemoveRestrictedAndReservedScopes (Set< SystemScope > scopes)
 
Set< SystemScoperemoveReservedScopes (Set< SystemScope > scopes)
 

静的公開変数類

static final String OFFLINE_ACCESS = "offline_access"
 
static final String OPENID_SCOPE = "openid"
 
static final String REGISTRATION_TOKEN_SCOPE = "registration-token"
 
static final String RESOURCE_TOKEN_SCOPE = "resource-token"
 
static final String UMA_PROTECTION_SCOPE = "uma_protection"
 
static final String UMA_AUTHORIZATION_SCOPE = "uma_authorization"
 
static final Set< SystemScopereservedScopes
 

非公開変数類

SystemScopeRepository repository
 
Predicate< SystemScopeisDefault
 
Predicate< SystemScopeisRestricted
 
Predicate< SystemScopeisReserved
 
Function< String, SystemScopestringToSystemScope
 
Function< SystemScope, String > systemScopeToString
 

詳解

著者
jricher

関数詳解

◆ fromStrings()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.fromStrings ( Set< String >  scope)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

148  {
149  if (scope == null) {
150  return null;
151  } else {
152  return new LinkedHashSet<>(Collections2.filter(Collections2.transform(scope, stringToSystemScope), Predicates.notNull()));
153  }
154  }
Function< String, SystemScope > stringToSystemScope
Definition: DefaultSystemScopeService.java:70

◆ getAll()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.getAll ( )
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

103  {
104  return repository.getAll();
105  }
SystemScopeRepository repository
Definition: DefaultSystemScopeService.java:47

◆ getById()

SystemScope org.mitre.oauth2.service.impl.DefaultSystemScopeService.getById ( Long  id)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

111  {
112  return repository.getById(id);
113  }
SystemScopeRepository repository
Definition: DefaultSystemScopeService.java:47

◆ getByValue()

SystemScope org.mitre.oauth2.service.impl.DefaultSystemScopeService.getByValue ( String  value)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

119  {
120  return repository.getByValue(value);
121  }
SystemScopeRepository repository
Definition: DefaultSystemScopeService.java:47

◆ getDefaults()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.getDefaults ( )
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

192  {
193  return Sets.filter(getAll(), isDefault);
194  }
Predicate< SystemScope > isDefault
Definition: DefaultSystemScopeService.java:49
Set< SystemScope > getAll()
Definition: DefaultSystemScopeService.java:103

◆ getReserved()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.getReserved ( )
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

198  {
199  return reservedScopes;
200  }
static final Set< SystemScope > reservedScopes
Definition: SystemScopeService.java:42

◆ getRestricted()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.getRestricted ( )
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

203  {
204  return Sets.filter(getAll(), isRestricted);
205  }
Predicate< SystemScope > isRestricted
Definition: DefaultSystemScopeService.java:56
Set< SystemScope > getAll()
Definition: DefaultSystemScopeService.java:103

◆ getUnrestricted()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.getUnrestricted ( )
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

208  {
209  return Sets.filter(getAll(), Predicates.not(isRestricted));
210  }
Predicate< SystemScope > isRestricted
Definition: DefaultSystemScopeService.java:56
Set< SystemScope > getAll()
Definition: DefaultSystemScopeService.java:103

◆ remove()

void org.mitre.oauth2.service.impl.DefaultSystemScopeService.remove ( SystemScope  scope)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

127  {
128  repository.remove(scope);
129 
130  }
SystemScopeRepository repository
Definition: DefaultSystemScopeService.java:47

◆ removeReservedScopes()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.removeReservedScopes ( Set< SystemScope scopes)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

218  {
219  return Sets.filter(scopes, Predicates.not(isReserved));
220  }
Predicate< SystemScope > isReserved
Definition: DefaultSystemScopeService.java:63

◆ removeRestrictedAndReservedScopes()

Set<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.removeRestrictedAndReservedScopes ( Set< SystemScope scopes)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

213  {
214  return Sets.filter(scopes, Predicates.not(Predicates.or(isRestricted, isReserved)));
215  }
Predicate< SystemScope > isRestricted
Definition: DefaultSystemScopeService.java:56
Predicate< SystemScope > isReserved
Definition: DefaultSystemScopeService.java:63

◆ save()

SystemScope org.mitre.oauth2.service.impl.DefaultSystemScopeService.save ( SystemScope  scope)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

136  {
137  if (!isReserved.apply(scope)) { // don't allow saving of reserved scopes
138  return repository.save(scope);
139  } else {
140  return null;
141  }
142  }
SystemScopeRepository repository
Definition: DefaultSystemScopeService.java:47
Predicate< SystemScope > isReserved
Definition: DefaultSystemScopeService.java:63

◆ scopesMatch()

boolean org.mitre.oauth2.service.impl.DefaultSystemScopeService.scopesMatch ( Set< String >  expected,
Set< String >  actual 
)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

172  {
173 
174  Set<SystemScope> ex = fromStrings(expected);
175  Set<SystemScope> act = fromStrings(actual);
176 
177  for (SystemScope actScope : act) {
178  // first check to see if there's an exact match
179  if (!ex.contains(actScope)) {
180  return false;
181  } else {
182  // if we did find an exact match, we need to check the rest
183  }
184  }
185 
186  // if we got all the way down here, the setup passed
187  return true;
188 
189  }
Set< SystemScope > fromStrings(Set< String > scope)
Definition: DefaultSystemScopeService.java:148

◆ toStrings()

Set<String> org.mitre.oauth2.service.impl.DefaultSystemScopeService.toStrings ( Set< SystemScope scope)
inline

org.mitre.oauth2.service.SystemScopeServiceを実装しています。

160  {
161  if (scope == null) {
162  return null;
163  } else {
164  return new LinkedHashSet<>(Collections2.filter(Collections2.transform(scope, systemScopeToString), Predicates.notNull()));
165  }
166  }
Function< SystemScope, String > systemScopeToString
Definition: DefaultSystemScopeService.java:88

メンバ詳解

◆ isDefault

Predicate<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.isDefault
private
初期値:
= new Predicate<SystemScope>() {
@Override
public boolean apply(SystemScope input) {
return (input != null && input.isDefaultScope());
}
}

◆ isReserved

Predicate<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.isReserved
private
初期値:
= new Predicate<SystemScope>() {
@Override
public boolean apply(SystemScope input) {
return (input != null && getReserved().contains(input));
}
}

◆ isRestricted

Predicate<SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.isRestricted
private
初期値:
= new Predicate<SystemScope>() {
@Override
public boolean apply(SystemScope input) {
return (input != null && input.isRestricted());
}
}

◆ OFFLINE_ACCESS

final String org.mitre.oauth2.service.SystemScopeService.OFFLINE_ACCESS = "offline_access"
staticinherited

◆ OPENID_SCOPE

final String org.mitre.oauth2.service.SystemScopeService.OPENID_SCOPE = "openid"
staticinherited

◆ REGISTRATION_TOKEN_SCOPE

final String org.mitre.oauth2.service.SystemScopeService.REGISTRATION_TOKEN_SCOPE = "registration-token"
staticinherited

◆ repository

SystemScopeRepository org.mitre.oauth2.service.impl.DefaultSystemScopeService.repository
private

◆ reservedScopes

final Set<SystemScope> org.mitre.oauth2.service.SystemScopeService.reservedScopes
staticinherited
初期値:
=
Sets.newHashSet(
new SystemScope(REGISTRATION_TOKEN_SCOPE),
new SystemScope(RESOURCE_TOKEN_SCOPE)
)

◆ RESOURCE_TOKEN_SCOPE

final String org.mitre.oauth2.service.SystemScopeService.RESOURCE_TOKEN_SCOPE = "resource-token"
staticinherited

◆ stringToSystemScope

Function<String, SystemScope> org.mitre.oauth2.service.impl.DefaultSystemScopeService.stringToSystemScope
private
初期値:
= new Function<String, SystemScope>() {
@Override
public SystemScope apply(String input) {
if (Strings.isNullOrEmpty(input)) {
return null;
} else {
SystemScope s = getByValue(input);
if (s == null) {
s = new SystemScope(input);
}
return s;
}
}
}

◆ systemScopeToString

Function<SystemScope, String> org.mitre.oauth2.service.impl.DefaultSystemScopeService.systemScopeToString
private
初期値:
= new Function<SystemScope, String>() {
@Override
public String apply(SystemScope input) {
if (input == null) {
return null;
} else {
return input.getValue();
}
}
}

◆ UMA_AUTHORIZATION_SCOPE

final String org.mitre.oauth2.service.SystemScopeService.UMA_AUTHORIZATION_SCOPE = "uma_authorization"
staticinherited

◆ UMA_PROTECTION_SCOPE

final String org.mitre.oauth2.service.SystemScopeService.UMA_PROTECTION_SCOPE = "uma_protection"
staticinherited

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