keycloak-oidc-service
公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
org.keycloak.authorization.common.ClientModelIdentity クラス
org.keycloak.authorization.common.ClientModelIdentity の継承関係図
Inheritance graph
org.keycloak.authorization.common.ClientModelIdentity 連携図
Collaboration graph

公開メンバ関数

 ClientModelIdentity (KeycloakSession session, ClientModel client)
 
String getId ()
 
Attributes getAttributes ()
 
boolean hasRealmRole (String roleName)
 
boolean hasClientRole (String clientId, String roleName)
 

限定公開変数類

RealmModel realm
 
ClientModel client
 
UserModel serviceAccount
 

詳解

著者
Bill Burke
バージョン
Revision
1

構築子と解体子

◆ ClientModelIdentity()

org.keycloak.authorization.common.ClientModelIdentity.ClientModelIdentity ( KeycloakSession  session,
ClientModel  client 
)
inline
39  {
40  this.realm = client.getRealm();
41  this.client = client;
42  this.serviceAccount = session.users().getServiceAccount(client);
43  }
ClientModel client
Definition: ClientModelIdentity.java:36
RealmModel realm
Definition: ClientModelIdentity.java:35
UserModel serviceAccount
Definition: ClientModelIdentity.java:37

関数詳解

◆ getAttributes()

Attributes org.keycloak.authorization.common.ClientModelIdentity.getAttributes ( )
inline

org.keycloak.authorization.identity.Identityを実装しています。

51  {
52  MultivaluedHashMap map = new MultivaluedHashMap<String, String>();
53  if (serviceAccount != null) map.addAll(serviceAccount.getAttributes());
54  return Attributes.from(map);
55  }
Map< String, List< String > > getAttributes()
UserModel serviceAccount
Definition: ClientModelIdentity.java:37

◆ getId()

String org.keycloak.authorization.common.ClientModelIdentity.getId ( )
inline

org.keycloak.authorization.identity.Identityを実装しています。

46  {
47  return client.getId();
48  }
ClientModel client
Definition: ClientModelIdentity.java:36

◆ hasClientRole()

boolean org.keycloak.authorization.common.ClientModelIdentity.hasClientRole ( String  clientId,
String  roleName 
)
inline

org.keycloak.authorization.identity.Identityを実装しています。

66  {
67  if (serviceAccount == null) return false;
68  ClientModel client = realm.getClientByClientId(clientId);
69  RoleModel role = client.getRole(roleName);
70  if (role == null) return false;
71  return serviceAccount.hasRole(role);
72  }
ClientModel client
Definition: ClientModelIdentity.java:36
boolean hasRole(RoleModel role)
ClientModel getClientByClientId(String clientId)
RealmModel realm
Definition: ClientModelIdentity.java:35
UserModel serviceAccount
Definition: ClientModelIdentity.java:37

◆ hasRealmRole()

boolean org.keycloak.authorization.common.ClientModelIdentity.hasRealmRole ( String  roleName)
inline

org.keycloak.authorization.identity.Identityを実装しています。

58  {
59  if (serviceAccount == null) return false;
60  RoleModel role = realm.getRole(roleName);
61  if (role == null) return false;
62  return serviceAccount.hasRole(role);
63  }
boolean hasRole(RoleModel role)
RealmModel realm
Definition: ClientModelIdentity.java:35
UserModel serviceAccount
Definition: ClientModelIdentity.java:37

メンバ詳解

◆ client

ClientModel org.keycloak.authorization.common.ClientModelIdentity.client
protected

◆ realm

RealmModel org.keycloak.authorization.common.ClientModelIdentity.realm
protected

◆ serviceAccount

UserModel org.keycloak.authorization.common.ClientModelIdentity.serviceAccount
protected

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