keycloak
公開メンバ関数 | 全メンバ一覧
org.keycloak.authorization.identity.Identity インタフェース
org.keycloak.authorization.identity.Identity の継承関係図
Inheritance graph
org.keycloak.authorization.identity.Identity 連携図
Collaboration graph

公開メンバ関数

String getId ()
 
Attributes getAttributes ()
 
default boolean hasRealmRole (String roleName)
 
default boolean hasClientRole (String clientId, String roleName)
 

詳解

Represents a security identity, which can be a person or non-person entity that was previously authenticated.

An Identity plays an important role during the evaluation of policies as they represent the entity to which one or more permissions should be granted or not, providing additional information and attributes that can be relevant to the different access control methods involved during the evaluation of policies.

著者
Pedro Igor

関数詳解

◆ getAttributes()

Attributes org.keycloak.authorization.identity.Identity.getAttributes ( )

Returns the attributes or claims associated with this identity.

戻り値
the attributes or claims associated with this identity

org.keycloak.authorization.common.KeycloakIdentity, org.keycloak.authorization.common.ClientModelIdentity, org.keycloak.authorization.common.UserModelIdentityで実装されています。

◆ getId()

String org.keycloak.authorization.identity.Identity.getId ( )

Returns the unique identifier of this identity.

戻り値
the unique identifier of this identity

org.keycloak.authorization.common.KeycloakIdentity, org.keycloak.authorization.common.ClientModelIdentity, org.keycloak.authorization.common.UserModelIdentityで実装されています。

◆ hasClientRole()

default boolean org.keycloak.authorization.identity.Identity.hasClientRole ( String  clientId,
String  roleName 
)
inline

Indicates if this identity is granted with a client role with the given roleName.

引数
clientIdthe client id
roleNamethe name of the role
戻り値
true if the identity has the given role. Otherwise, it returns false.

org.keycloak.authorization.common.ClientModelIdentity, org.keycloak.authorization.common.UserModelIdentityで実装されています。

66  {
67  return getAttributes().containsValue("kc.client." + clientId + ".roles", roleName);
68  }
default boolean containsValue(String name, String value)
Definition: Attributes.java:67

◆ hasRealmRole()

default boolean org.keycloak.authorization.identity.Identity.hasRealmRole ( String  roleName)
inline

Indicates if this identity is granted with a realm role with the given roleName.

引数
roleNamethe name of the role
戻り値
true if the identity has the given role. Otherwise, it returns false.

org.keycloak.authorization.common.ClientModelIdentity, org.keycloak.authorization.common.UserModelIdentityで実装されています。

54  {
55  return getAttributes().containsValue("kc.realm.roles", roleName);
56  }
default boolean containsValue(String name, String value)
Definition: Attributes.java:67

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