keycloak-service
公開メンバ関数 | 非公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.authorization.protection.resource.ResourceService クラス
org.keycloak.authorization.protection.resource.ResourceService 連携図
Collaboration graph

公開メンバ関数

 ResourceService (KeycloakSession session, ResourceServer resourceServer, Identity identity, ResourceSetService resourceManager)
 
Response create (UmaResourceRepresentation resource)
 
Response update (@PathParam("id") String id, ResourceRepresentation resource)
 
Response delete (@PathParam("id") String id)
 
Response findById (@PathParam("id") String id)
 
Response find (@QueryParam("_id") String id, @QueryParam("name") String name, @QueryParam("uri") String uri, @QueryParam("owner") String owner, @QueryParam("type") String type, @QueryParam("scope") String scope, @QueryParam("matchingUri") Boolean matchingUri, @QueryParam("deep") Boolean deep, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResult)
 

非公開メンバ関数

void checkResourceServerSettings ()
 

非公開変数類

final ResourceServer resourceServer
 
final ResourceSetService resourceManager
 
final KeycloakSession session
 
final Identity identity
 

詳解

著者
Pedro Igor

構築子と解体子

◆ ResourceService()

org.keycloak.authorization.protection.resource.ResourceService.ResourceService ( KeycloakSession  session,
ResourceServer  resourceServer,
Identity  identity,
ResourceSetService  resourceManager 
)
inline
57  {
58  this.session = session;
59  this.identity = identity;
62  }
final ResourceServer resourceServer
Definition: ResourceService.java:52
final ResourceSetService resourceManager
Definition: ResourceService.java:53
final Identity identity
Definition: ResourceService.java:55
final KeycloakSession session
Definition: ResourceService.java:54

関数詳解

◆ checkResourceServerSettings()

void org.keycloak.authorization.protection.resource.ResourceService.checkResourceServerSettings ( )
inlineprivate
139  {
140  if (!this.resourceServer.isAllowRemoteResourceManagement()) {
141  throw new ErrorResponseException("not_supported", "Remote management is disabled.", Status.BAD_REQUEST);
142  }
143  }
final ResourceServer resourceServer
Definition: ResourceService.java:52

◆ create()

Response org.keycloak.authorization.protection.resource.ResourceService.create ( UmaResourceRepresentation  resource)
inline
67  {
69 
70  if (resource == null) {
71  return Response.status(Status.BAD_REQUEST).build();
72  }
73 
74  ResourceOwnerRepresentation owner = resource.getOwner();
75 
76  if (owner == null) {
77  owner = new ResourceOwnerRepresentation();
78  resource.setOwner(owner);
79  }
80 
81  String ownerId = owner.getId();
82 
83  if (ownerId == null) {
84  ownerId = this.identity.getId();
85  }
86 
87  owner.setId(ownerId);
88 
89  ResourceRepresentation newResource = resourceManager.create(resource);
90 
91  resourceManager.audit(resource, resource.getId(), OperationType.CREATE);
92 
93  return Response.status(Status.CREATED).entity(new UmaResourceRepresentation(newResource)).build();
94  }
void checkResourceServerSettings()
Definition: ResourceService.java:139
final ResourceSetService resourceManager
Definition: ResourceService.java:53
final Identity identity
Definition: ResourceService.java:55
void audit(ResourceRepresentation resource, OperationType operation)
Definition: ResourceSetService.java:471
ResourceRepresentation create(ResourceRepresentation resource)
Definition: ResourceSetService.java:110

◆ delete()

Response org.keycloak.authorization.protection.resource.ResourceService.delete ( @PathParam("id") String  id)
inline
106  {
108  return this.resourceManager.delete(id);
109  }
void checkResourceServerSettings()
Definition: ResourceService.java:139
final ResourceSetService resourceManager
Definition: ResourceService.java:53
Response delete(@PathParam("id") String id)
Definition: ResourceSetService.java:160

◆ find()

Response org.keycloak.authorization.protection.resource.ResourceService.find ( @QueryParam("_id") String  id,
@QueryParam("name") String  name,
@QueryParam("uri") String  uri,
@QueryParam("owner") String  owner,
@QueryParam("type") String  type,
@QueryParam("scope") String  scope,
@QueryParam("matchingUri") Boolean  matchingUri,
@QueryParam("deep") Boolean  deep,
@QueryParam("first") Integer  firstResult,
@QueryParam("max") Integer  maxResult 
)
inline
130  {
131 
132  if(deep != null && deep) {
133  return resourceManager.find(id, name, uri, owner, type, scope, matchingUri, deep, firstResult, maxResult);
134  } else {
135  return resourceManager.find(id, name, uri, owner, type, scope, matchingUri, deep, firstResult, maxResult, (BiFunction<Resource, Boolean, String>) (resource, deep1) -> resource.getId());
136  }
137  }
final ResourceSetService resourceManager
Definition: ResourceService.java:53
Response find(@QueryParam("name") String name)
Definition: ResourceSetService.java:315

◆ findById()

Response org.keycloak.authorization.protection.resource.ResourceService.findById ( @PathParam("id") String  id)
inline
114  {
115  return this.resourceManager.findById(id, UmaResourceRepresentation::new);
116  }
final ResourceSetService resourceManager
Definition: ResourceService.java:53
Response findById(@PathParam("id") String id)
Definition: ResourceSetService.java:182

◆ update()

Response org.keycloak.authorization.protection.resource.ResourceService.update ( @PathParam("id") String  id,
ResourceRepresentation  resource 
)
inline
100  {
101  return this.resourceManager.update(id, resource);
102  }
final ResourceSetService resourceManager
Definition: ResourceService.java:53
Response update(@PathParam("id") String id, ResourceRepresentation resource)
Definition: ResourceSetService.java:140

メンバ詳解

◆ identity

final Identity org.keycloak.authorization.protection.resource.ResourceService.identity
private

◆ resourceManager

final ResourceSetService org.keycloak.authorization.protection.resource.ResourceService.resourceManager
private

◆ resourceServer

final ResourceServer org.keycloak.authorization.protection.resource.ResourceService.resourceServer
private

◆ session

final KeycloakSession org.keycloak.authorization.protection.resource.ResourceService.session
private

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