keycloak-service
公開メンバ関数 | 非公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean クラス
org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean 連携図
Collaboration graph

公開メンバ関数

 RequesterBean (PermissionTicket ticket, AuthorizationProvider authorization)
 
UserModel getRequester ()
 
List< PermissionScopeBeangetScopes ()
 
boolean isGranted ()
 
Date getCreatedDate ()
 
Date getGrantedDate ()
 

非公開メンバ関数

void addScope (PermissionTicket ticket)
 

非公開変数類

final Long createdTimestamp
 
final Long grantedTimestamp
 
UserModel requester
 
List< PermissionScopeBeanscopes = new ArrayList<>()
 
boolean granted
 

詳解

構築子と解体子

◆ RequesterBean()

org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.RequesterBean ( PermissionTicket  ticket,
AuthorizationProvider  authorization 
)
inline
149  {
150  this.requester = authorization.getKeycloakSession().users().getUserById(ticket.getRequester(), authorization.getRealm());
151  granted = ticket.isGranted();
152  createdTimestamp = ticket.getCreatedTimestamp();
153  grantedTimestamp = ticket.getGrantedTimestamp();
154  }
final AuthorizationProvider authorization
Definition: AuthorizationBean.java:52
final Long createdTimestamp
Definition: AuthorizationBean.java:143
final Long grantedTimestamp
Definition: AuthorizationBean.java:144
UserModel requester
Definition: AuthorizationBean.java:145

関数詳解

◆ addScope()

void org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.addScope ( PermissionTicket  ticket)
inlineprivate
164  {
165  if (ticket != null) {
166  scopes.add(new PermissionScopeBean(ticket));
167  }
168  }
List< PermissionScopeBean > scopes
Definition: AuthorizationBean.java:146

◆ getCreatedDate()

Date org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.getCreatedDate ( )
inline
174  {
175  return Time.toDate(createdTimestamp);
176  }
final Long createdTimestamp
Definition: AuthorizationBean.java:143

◆ getGrantedDate()

Date org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.getGrantedDate ( )
inline
178  {
179  if (grantedTimestamp == null) {
180  PermissionScopeBean permission = scopes.stream().filter(permissionScopeBean -> permissionScopeBean.isGranted()).findFirst().orElse(null);
181 
182  if (permission == null) {
183  return null;
184  }
185 
186  return permission.getGrantedDate();
187  }
188  return Time.toDate(grantedTimestamp);
189  }
List< PermissionScopeBean > scopes
Definition: AuthorizationBean.java:146
final Long grantedTimestamp
Definition: AuthorizationBean.java:144

◆ getRequester()

UserModel org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.getRequester ( )
inline
156  {
157  return requester;
158  }
UserModel requester
Definition: AuthorizationBean.java:145

◆ getScopes()

List<PermissionScopeBean> org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.getScopes ( )
inline
160  {
161  return scopes;
162  }
List< PermissionScopeBean > scopes
Definition: AuthorizationBean.java:146

◆ isGranted()

boolean org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.isGranted ( )
inline
170  {
171  return (granted && scopes.isEmpty()) || scopes.stream().filter(permissionScopeBean -> permissionScopeBean.isGranted()).count() > 0;
172  }
List< PermissionScopeBean > scopes
Definition: AuthorizationBean.java:146

メンバ詳解

◆ createdTimestamp

final Long org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.createdTimestamp
private

◆ granted

boolean org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.granted
private

◆ grantedTimestamp

final Long org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.grantedTimestamp
private

◆ requester

UserModel org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.requester
private

◆ scopes

List<PermissionScopeBean> org.keycloak.forms.account.freemarker.model.AuthorizationBean.RequesterBean.scopes = new ArrayList<>()
private

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