okta / okta-sdk-golang

A Golang SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
https://github.com/okta/okta-sdk-golang
Other
181 stars 145 forks source link

Allow updating JWT authentication client assertions #487

Open ArikWiz opened 2 months ago

ArikWiz commented 2 months ago

Describe the feature request?

When using JWT authentication, the client assertions in the configuration are static, and won't be updated after the token expires in

func (a *JWTAuth) Authorize ... {
   ....
   accessToken, nonce, privateKey, err := getAccessTokenForPrivateKey(a.httpClient, a.orgURL, a.clientAssertion ...)
   ....
}

compare that to:

func (a *PrivateKeyAuth) Authorize {
   ...
   clientAssertion, err := createClientAssertion(a.orgURL, a.clientId, a.privateKeySigner)
   ...
}

i think allowing for the ClientAssertion to be a callback rather than a string, in JWTAuthConfig, would solve the issue

New or Affected Resource(s)

okta authentication

Provide a documentation link

No response

Additional Information?

No response

github-actions[bot] commented 2 months ago

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

github-actions[bot] commented 2 days ago

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.