Skip to content

Commit f2c19a1

Browse files
authored
feat(jans-config-api): enhancement to agama and uma resource endpoint (#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
1 parent 1d345e3 commit f2c19a1

File tree

6 files changed

+394
-64
lines changed

6 files changed

+394
-64
lines changed

jans-config-api/common/src/main/java/io/jans/configapi/util/ApiConstants.java

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ private ApiConstants() {}
7979
public static final String QNAME_PATH = "{qname}";
8080
public static final String ENABLED = "enabled";
8181
public static final String QNAME = "qname";
82+
public static final String INCLUDE_SOURCE = "includeSource";
83+
public static final String SOURCE = "/source/";
8284

8385
public static final String LIMIT = "limit";
8486
public static final String START_INDEX = "startIndex";

jans-config-api/docs/jans-config-api-swagger.yaml

+111-35
Original file line numberDiff line numberDiff line change
@@ -2053,6 +2053,7 @@ paths:
20532053
description: Internal Server Error
20542054
security:
20552055
- oauth2: [https://jans.io/oauth/config/openid/clients.write]
2056+
20562057
/jans-config-api/api/v1/uma/resources:
20572058
get:
20582059
tags:
@@ -2169,38 +2170,7 @@ paths:
21692170
description: Internal Server Error
21702171
security:
21712172
- oauth2: [https://jans.io/oauth/config/uma/resources.readonly]
2172-
/jans-config-api/api/v1/uma/resources/clientId/{clientId}:
2173-
parameters:
2174-
- name: clientId
2175-
in: path
2176-
required: true
2177-
description: Client ID.
2178-
schema:
2179-
type: string
2180-
get:
2181-
tags:
2182-
- OAuth - UMA Resources
2183-
summary: Fetch uma resources by client id.
2184-
description: Fetch uma resources by client id.
2185-
operationId: get-oauth-uma-resources-by-clientid
2186-
responses:
2187-
'200':
2188-
description: OK
2189-
content:
2190-
application/json:
2191-
schema:
2192-
title: UMA Resource list.
2193-
description: List of UMA Resource.
2194-
items:
2195-
$ref: '#/components/schemas/UmaResource'
2196-
'401':
2197-
$ref: '#/components/responses/Unauthorized'
2198-
'404':
2199-
$ref: '#/components/responses/NotFound'
2200-
'500':
2201-
description: Internal Server Error
2202-
security:
2203-
- oauth2: [https://jans.io/oauth/config/uma/resources.readonly]
2173+
22042174
delete:
22052175
tags:
22062176
- OAuth - UMA Resources
@@ -2218,6 +2188,7 @@ paths:
22182188
description: Internal Server Error
22192189
security:
22202190
- oauth2: [https://jans.io/oauth/config/uma/resources.delete]
2191+
22212192
patch:
22222193
tags:
22232194
- OAuth - UMA Resources
@@ -2249,6 +2220,42 @@ paths:
22492220
description: Internal Server Error
22502221
security:
22512222
- oauth2: [https://jans.io/oauth/config/uma/resources.write]
2223+
2224+
2225+
/jans-config-api/api/v1/uma/resources/clientId/{clientId}:
2226+
parameters:
2227+
- name: clientId
2228+
in: path
2229+
required: true
2230+
description: Client ID.
2231+
schema:
2232+
type: string
2233+
get:
2234+
tags:
2235+
- OAuth - UMA Resources
2236+
summary: Fetch uma resources by client id.
2237+
description: Fetch uma resources by client id.
2238+
operationId: get-oauth-uma-resources-by-clientid
2239+
responses:
2240+
'200':
2241+
description: OK
2242+
content:
2243+
application/json:
2244+
schema:
2245+
title: UMA Resource list.
2246+
description: List of UMA Resource.
2247+
items:
2248+
$ref: '#/components/schemas/UmaResource'
2249+
'401':
2250+
$ref: '#/components/responses/Unauthorized'
2251+
'404':
2252+
$ref: '#/components/responses/NotFound'
2253+
'500':
2254+
description: Internal Server Error
2255+
security:
2256+
- oauth2: [https://jans.io/oauth/config/uma/resources.readonly]
2257+
2258+
22522259
/jans-config-api/api/v1/scopes:
22532260
get:
22542261
tags:
@@ -2534,8 +2541,7 @@ paths:
25342541
$ref: '#/components/responses/InternalServerError'
25352542
security:
25362543
- oauth2: [https://jans.io/oauth/config/agama.write]
2537-
2538-
2544+
25392545
put:
25402546
summary: Updates an agama flow based on Qname.
25412547
description: Updates an agama based on Qname.
@@ -2561,7 +2567,39 @@ paths:
25612567
'500':
25622568
$ref: '#/components/responses/InternalServerError'
25632569
security:
2564-
- oauth2: [https://jans.io/oauth/config/agama.write]
2570+
- oauth2: [https://jans.io/oauth/config/agama.write]
2571+
2572+
patch:
2573+
summary: Partially modify a Agama Flow.
2574+
description: Partially modify a Agama Flow.
2575+
operationId: patch-agama-flow
2576+
tags:
2577+
- Configuration – Agama Flow
2578+
requestBody:
2579+
content:
2580+
application/json-patch+json:
2581+
schema:
2582+
type: array
2583+
items:
2584+
$ref: '#/components/schemas/PatchRequest'
2585+
description: String representing patch-document.
2586+
example: '[ {op:replace, path: enabled, value: \"false\" } ]'
2587+
responses:
2588+
'200':
2589+
description: OK
2590+
content:
2591+
application/json:
2592+
schema:
2593+
$ref: '#/components/schemas/AgamaFlow'
2594+
'401':
2595+
$ref: '#/components/responses/Unauthorized'
2596+
'404':
2597+
$ref: '#/components/responses/NotFound'
2598+
'500':
2599+
$ref: '#/components/responses/InternalServerError'
2600+
security:
2601+
- oauth2: [https://jans.io/oauth/config/agama.write]
2602+
25652603
delete:
25662604
summary: Deletes an agama flow based on Qname.
25672605
description: Deletes an agama flow based on Qname.
@@ -2580,6 +2618,41 @@ paths:
25802618
security:
25812619
- oauth2: [https://jans.io/oauth/config/agama.delete]
25822620
2621+
/jans-config-api/api/v1/agama/source/{qname}:
2622+
parameters:
2623+
- schema:
2624+
type: string
2625+
name: qname
2626+
in: path
2627+
description: flow qname.
2628+
required: true
2629+
2630+
put:
2631+
summary: Update agama flow from source file.
2632+
description: Update agama flow from source file.
2633+
operationId: put-agama-flow-from-source
2634+
tags:
2635+
- Configuration – Agama Flow
2636+
requestBody:
2637+
content:
2638+
text/plain:
2639+
schema:
2640+
type: string
2641+
2642+
responses:
2643+
'201':
2644+
description: CREATED
2645+
content:
2646+
application/json:
2647+
schema:
2648+
$ref: '#/components/schemas/AgamaFlow'
2649+
'401':
2650+
$ref: '#/components/responses/Unauthorized'
2651+
'500':
2652+
$ref: '#/components/responses/InternalServerError'
2653+
security:
2654+
- oauth2: [https://jans.io/oauth/config/agama.write]
2655+
25832656
/jans-config-api/api/v1/stat:
25842657
get:
25852658
summary: Provides server with basic statistic.
@@ -3577,6 +3650,9 @@ components:
35773650
https://jans.io/oauth/config/user.readonly: View user related information
35783651
https://jans.io/oauth/config/user.write: Manage user related information
35793652
https://jans.io/oauth/config/user.delete: Delete user related information
3653+
https://jans.io/oauth/config/agama.readonly: View Agama Flow related information
3654+
https://jans.io/oauth/config/agama.write: Manage Agama Flow related information
3655+
https://jans.io/oauth/config/agama.delete: Delete Agama Flow related information
35803656

35813657

35823658
responses:

jans-config-api/profiles/local/test.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ test.scopes=https://jans.io/oauth/config/acrs.readonly https://jans.io/oauth/con
44
# jans.server
55
token.endpoint=https://jans.server1/jans-auth/restv1/token
66
token.grant.type=client_credentials
7-
test.client.id=1800.d2d3ab98-e018-4a75-bc1d-15b5ac8cb455
8-
test.client.secret=oGjYGFjhBr97
7+
test.client.id=1800.c3d63983-6883-438d-b974-38348645de42
8+
test.client.secret=QzZFg9RnQjSP
99
test.issuer=https://jans.server1

0 commit comments

Comments
 (0)