keycloak
公開メンバ関数 | 全メンバ一覧
org.keycloak.authorization.policy.evaluation.Realm インタフェース
org.keycloak.authorization.policy.evaluation.Realm 連携図
Collaboration graph

公開メンバ関数

default boolean isUserInGroup (String id, String group)
 
boolean isUserInGroup (String id, String group, boolean checkParent)
 
boolean isUserInRealmRole (String id, String role)
 
boolean isUserInClientRole (String id, String clientId, String role)
 
boolean isGroupInRole (String group, String role)
 
List< String > getUserRealmRoles (String id)
 
List< String > getUserClientRoles (String id, String clientId)
 
List< String > getUserGroups (String id)
 
Map< String, List< String > > getUserAttributes (String id)
 

詳解

This interface provides methods to query information from a realm.

著者
Pedro Igor

関数詳解

◆ getUserAttributes()

Map<String, List<String> > org.keycloak.authorization.policy.evaluation.Realm.getUserAttributes ( String  id)

Returns all attributes associated with the a user with the given id.

引数
idthe user id. It can be the id, username or email
戻り値
a map with the attributes associated with the user

◆ getUserClientRoles()

List<String> org.keycloak.authorization.policy.evaluation.Realm.getUserClientRoles ( String  id,
String  clientId 
)

Returns all client roles granted for a user with the given id.

引数
idthe user id. It can be the id, username or email
clientIdthe client id
戻り値
the roles granted to the user

◆ getUserGroups()

List<String> org.keycloak.authorization.policy.evaluation.Realm.getUserGroups ( String  id)

Returns all groups which the user with the given id is a member.

引数
idthe user id. It can be the id, username or email
戻り値
the groups which the user is a member

◆ getUserRealmRoles()

List<String> org.keycloak.authorization.policy.evaluation.Realm.getUserRealmRoles ( String  id)

Returns all realm roles granted for a user with the given id.

引数
idthe user id. It can be the id, username or email
戻り値
the roles granted to the user

◆ isGroupInRole()

boolean org.keycloak.authorization.policy.evaluation.Realm.isGroupInRole ( String  group,
String  role 
)

Checks whether or not a group is granted with the given realm role.

引数
groupthe group path. For instance, /Group A/Group B.
rolethe role name
戻り値
true if the group is granted with the role. Otherwise, false.

◆ isUserInClientRole()

boolean org.keycloak.authorization.policy.evaluation.Realm.isUserInClientRole ( String  id,
String  clientId,
String  role 
)

Checks whether or not a user with the given id is granted with the given client role.

引数
idthe user id. It can be the id, username or email
clientIdthe client id
rolethe role name
戻り値
true if the user is granted with the role. Otherwise, false.

◆ isUserInGroup() [1/2]

default boolean org.keycloak.authorization.policy.evaluation.Realm.isUserInGroup ( String  id,
String  group 
)
inline

Checks whether or not a user with the given id is a member of the given group.

This method will also consider memberships where the user is a member of any child group of the given group. For instance, if user is member of /Group A/Group B and this method is checking if user is a member of /Group A the result will be true given that the user is a member of a child group of /Group A.

引数
idthe user id. It can be the id, username or email
groupthe group path. For instance, /Group A/Group B.
戻り値
true if user is a member of the given group. Otherwise returns false.
40  {
41  return isUserInGroup(id, group, true);
42  }
default boolean isUserInGroup(String id, String group)
Definition: Realm.java:40

◆ isUserInGroup() [2/2]

boolean org.keycloak.authorization.policy.evaluation.Realm.isUserInGroup ( String  id,
String  group,
boolean  checkParent 
)

Checks whether or not a user with the given id is a member of the given group.

引数
idthe user id. It can be the id, username or email
groupthe group path. For instance, /Group A/Group B.
checkParentif true, this method returns true even though the user is not directly associated with the given group but a member of any child of the group.
戻り値
true if user is a member of the given group. Otherwise returns false.

◆ isUserInRealmRole()

boolean org.keycloak.authorization.policy.evaluation.Realm.isUserInRealmRole ( String  id,
String  role 
)

Checks whether or not a user with the given id is granted with the given realm role.

引数
idthe user id. It can be the id, username or email
rolethe role name
戻り値
true if the user is granted with the role. Otherwise, false.

このインタフェース詳解は次のファイルから抽出されました: