Skip to content

Commit

Permalink
feat(jans-config-api): enhancement to agama and uma resource endpoint (
Browse files Browse the repository at this point in the history
…#2015)

* bug(jans-config-api): fixed swagger format issue

* fix(jans-config-api): fixed due to couchbase clustter change

* feat(jans-config-api): new endpoint to get UmaResource based on associatedClient

* fix(jans-config-api): swagger spec fix for client attributes

* fix(jans-config-api): reverted the local test properties

* test(jans-config-api): commented test case

* feat(jans-config-api): scim config endpoint enhancment

* feat(jans-config-api): swagger and DTO change for new fields for scim config endpoint

* feat(jans-config-api): swagger and DTO change for new fields for scim config endpoint

* fix(jans-config-api): rectified endpoint url in swagger spec for uma resource

* feat(jans-config-api): agama endpoint fixes

* fix(jans-config-api): agama endpoint enhancements

* fix(jans-config-api): fixed swagger spec for Uma Resource delete

* fix(jans-config-api): agama endpoint enhancements

* fix(jans-config-api): agama endpoint enhancements

* fix(jans-config-api): agama endpoint enhancements

* fix(jans-config-api): agama endpoint enhancements

* fix(jans-config-api): agama endpoint enhancements
  • Loading branch information
pujavs committed Aug 3, 2022
1 parent 1d345e3 commit f2c19a1
Show file tree
Hide file tree
Showing 6 changed files with 394 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ private ApiConstants() {}
public static final String QNAME_PATH = "{qname}";
public static final String ENABLED = "enabled";
public static final String QNAME = "qname";
public static final String INCLUDE_SOURCE = "includeSource";
public static final String SOURCE = "/source/";

public static final String LIMIT = "limit";
public static final String START_INDEX = "startIndex";
Expand Down
146 changes: 111 additions & 35 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,7 @@ paths:
description: Internal Server Error
security:
- oauth2: [https://jans.io/oauth/config/openid/clients.write]
/jans-config-api/api/v1/uma/resources:
get:
tags:
Expand Down Expand Up @@ -2169,38 +2170,7 @@ paths:
description: Internal Server Error
security:
- oauth2: [https://jans.io/oauth/config/uma/resources.readonly]
/jans-config-api/api/v1/uma/resources/clientId/{clientId}:
parameters:
- name: clientId
in: path
required: true
description: Client ID.
schema:
type: string
get:
tags:
- OAuth - UMA Resources
summary: Fetch uma resources by client id.
description: Fetch uma resources by client id.
operationId: get-oauth-uma-resources-by-clientid
responses:
'200':
description: OK
content:
application/json:
schema:
title: UMA Resource list.
description: List of UMA Resource.
items:
$ref: '#/components/schemas/UmaResource'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
description: Internal Server Error
security:
- oauth2: [https://jans.io/oauth/config/uma/resources.readonly]
delete:
tags:
- OAuth - UMA Resources
Expand All @@ -2218,6 +2188,7 @@ paths:
description: Internal Server Error
security:
- oauth2: [https://jans.io/oauth/config/uma/resources.delete]
patch:
tags:
- OAuth - UMA Resources
Expand Down Expand Up @@ -2249,6 +2220,42 @@ paths:
description: Internal Server Error
security:
- oauth2: [https://jans.io/oauth/config/uma/resources.write]
/jans-config-api/api/v1/uma/resources/clientId/{clientId}:
parameters:
- name: clientId
in: path
required: true
description: Client ID.
schema:
type: string
get:
tags:
- OAuth - UMA Resources
summary: Fetch uma resources by client id.
description: Fetch uma resources by client id.
operationId: get-oauth-uma-resources-by-clientid
responses:
'200':
description: OK
content:
application/json:
schema:
title: UMA Resource list.
description: List of UMA Resource.
items:
$ref: '#/components/schemas/UmaResource'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
description: Internal Server Error
security:
- oauth2: [https://jans.io/oauth/config/uma/resources.readonly]


/jans-config-api/api/v1/scopes:
get:
tags:
Expand Down Expand Up @@ -2534,8 +2541,7 @@ paths:
$ref: '#/components/responses/InternalServerError'
security:
- oauth2: [https://jans.io/oauth/config/agama.write]


put:
summary: Updates an agama flow based on Qname.
description: Updates an agama based on Qname.
Expand All @@ -2561,7 +2567,39 @@ paths:
'500':
$ref: '#/components/responses/InternalServerError'
security:
- oauth2: [https://jans.io/oauth/config/agama.write]
- oauth2: [https://jans.io/oauth/config/agama.write]

patch:
summary: Partially modify a Agama Flow.
description: Partially modify a Agama Flow.
operationId: patch-agama-flow
tags:
- Configuration – Agama Flow
requestBody:
content:
application/json-patch+json:
schema:
type: array
items:
$ref: '#/components/schemas/PatchRequest'
description: String representing patch-document.
example: '[ {op:replace, path: enabled, value: \"false\" } ]'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AgamaFlow'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
security:
- oauth2: [https://jans.io/oauth/config/agama.write]
delete:
summary: Deletes an agama flow based on Qname.
description: Deletes an agama flow based on Qname.
Expand All @@ -2580,6 +2618,41 @@ paths:
security:
- oauth2: [https://jans.io/oauth/config/agama.delete]
/jans-config-api/api/v1/agama/source/{qname}:
parameters:
- schema:
type: string
name: qname
in: path
description: flow qname.
required: true
put:
summary: Update agama flow from source file.
description: Update agama flow from source file.
operationId: put-agama-flow-from-source
tags:
- Configuration – Agama Flow
requestBody:
content:
text/plain:
schema:
type: string

responses:
'201':
description: CREATED
content:
application/json:
schema:
$ref: '#/components/schemas/AgamaFlow'
'401':
$ref: '#/components/responses/Unauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
security:
- oauth2: [https://jans.io/oauth/config/agama.write]
/jans-config-api/api/v1/stat:
get:
summary: Provides server with basic statistic.
Expand Down Expand Up @@ -3577,6 +3650,9 @@ components:
https://jans.io/oauth/config/user.readonly: View user related information
https://jans.io/oauth/config/user.write: Manage user related information
https://jans.io/oauth/config/user.delete: Delete user related information
https://jans.io/oauth/config/agama.readonly: View Agama Flow related information
https://jans.io/oauth/config/agama.write: Manage Agama Flow related information
https://jans.io/oauth/config/agama.delete: Delete Agama Flow related information


responses:
Expand Down
4 changes: 2 additions & 2 deletions jans-config-api/profiles/local/test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ test.scopes=https://jans.io/oauth/config/acrs.readonly https://jans.io/oauth/con
# jans.server
token.endpoint=https://jans.server1/jans-auth/restv1/token
token.grant.type=client_credentials
test.client.id=1800.d2d3ab98-e018-4a75-bc1d-15b5ac8cb455
test.client.secret=oGjYGFjhBr97
test.client.id=1800.c3d63983-6883-438d-b974-38348645de42
test.client.secret=QzZFg9RnQjSP
test.issuer=https://jans.server1
Loading

0 comments on commit f2c19a1

Please sign in to comment.