Skip to content

Commit cce52e5

Browse files
author
allan
committed
fix: client / secret with autoapprove
1 parent 6e9650a commit cce52e5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/faq.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A diagram of the rules for determining whether a local or remote target is used
2424

2525
## How can I obtain a Viya client and secret?
2626

27-
For setting up the client / secret you will need the services of an administrator (a user with admin rights on the physical machine) as they need to query a protected file (the consul token). The client must be created with the 'authorization_code' grant type. If you are building a standalone application, it is also recommended to increase the expiry period of the refresh token to avoid manual re-authentications. The default expiry is 24 hours for an access token, and 30 days for a refresh token. This can be extended up to around 60 or 70 years.
27+
For setting up the client / secret you will need the services of an administrator (a user with admin rights on the physical machine) as they need to query a protected file (the consul token). The client must be created with the 'authorization_code' grant type. If you are building a standalone application, it is also recommended to increase the expiry period of the refresh token to avoid manual re-authentications. The default expiry is 24 hours for an access token, and 30 days for a refresh token. This can be extended up to around 60 or 70 years.
2828

2929
## Viya 2025
3030

@@ -38,7 +38,10 @@ The latest instructions are available [here](https://developer.sas.com/docs/rest
3838
curl -k -X POST "https://viya-f0g8ht62vq.engage.sas.com/SASLogon/oauth/clients" \
3939
-H "Content-Type: application/json" \
4040
-H "Authorization: Bearer VERY_LONG_ACCESS_TOKEN_FROM_STEP_ABOVE" \
41-
-d '{"client_id": "YOUR_CLIENT","client_secret": "YOUR_SECRET","scope": ["openid"],"authorized_grant_types": ["authorization_code","refresh_token"], "redirect_uri": "urn:ietf:wg:oauth:2.0:oob"}'
41+
-d '{"client_id": "YOUR_CLIENT","client_secret": "YOUR_SECRET",` \
42+
`"scope": ["openid"],"autoapprove":true,` \
43+
`"authorized_grant_types": ["authorization_code","refresh_token"],` \
44+
` "redirect_uri": "urn:ietf:wg:oauth:2.0:oob"}'
4245
```
4346

4447
This will create a YOUR_CLIENT and YOUR_SECRET client/secret pair using the authorization_code grant type (suitable for SASjs).

0 commit comments

Comments
 (0)