Skip to content

Commit 51e59d3

Browse files
Merge branch 'dev' into authenticator-tests
2 parents 2a332f5 + 803d79c commit 51e59d3

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

config-local.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"service_name": "authenticator",
3-
"service_password": "<TODO_get_from_SK>",
3+
"service_password": "Oh8zasCoRgV9C9BMt60dQIzA",
44
"primary_site_admin_tenant_base_url": "https://admin.develop.tapis.io",
55
"service_tenant_id": "admin",
66
"service_site_id": "tacc",
@@ -9,7 +9,7 @@
99
"log_level": "DEBUG",
1010
"populate_dev_ldap": true,
1111
"dev_ldap_tenant_id": "dev",
12-
"token_url": "<token_url>",
12+
"token_url": "https://dev.develop.tapis.io/v3/tokens",
1313
"impers_oauth_client_id": "<impers_oauth_client_id>",
1414
"impers_oauth_client_secret": "<impers_oauth_client_secret>",
1515
"impersadmin_username": "<impersadmin_username>",

service/controllers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,8 +1310,9 @@ def post(self):
13101310
# client id and client key are optional on the password grant type to allow new users to generate tokens
13111311
# right away before they create a client
13121312
if not auth:
1313-
client_id = None
1314-
client_key = None
1313+
# kprice 1/27/2025 optionally can include client credentials in post body
1314+
client_id = data.get('client_id')
1315+
client_key = data.get('client_key')
13151316
else:
13161317
try:
13171318
client_id = auth.username

service/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@ def get_derived_values(cls, data):
904904
result['code'] = getattr(data, 'code', None)
905905
# device code grant:
906906
result['client_id'] = getattr(data, 'client_id', None)
907+
result['client_key'] = getattr(data, 'client_key', None)
907908
result['device_code'] = getattr(data, 'device_code', None)
908909
# refresh token:
909910
result['refresh_token'] = getattr(data, 'refresh_token', None)

service/resources/openapi_v3.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,9 @@ components:
619619
client_id:
620620
type: string
621621
description: The client_id being authenticated (for device_code grant).
622+
client_key:
623+
type: string
624+
description: The client_key being authenticated (optional for authorization_code grant).
622625
grant_type:
623626
type: string
624627
description: The OAuth2 grant type being used; either password, authorization_code or refresh_token.

0 commit comments

Comments
 (0)