-
Notifications
You must be signed in to change notification settings - Fork 264
doc: Samples for Documenting Custom Credential Suppliers #1820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Samples for Documenting Custom Credential Suppliers #1820
Conversation
…Workloads and Okta Workload.
d6f790b to
49d17f5
Compare
samples/snippets/src/main/java/CustomCredentialSupplierAwsWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierAwsWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierAwsWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierAwsWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierAwsWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierAwsWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierAwsWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/CustomCredentialSupplierOktaWorkload.java
Outdated
Show resolved
Hide resolved
| // Check if the current token is still valid (with a 60-second buffer). | ||
| boolean isTokenValid = | ||
| this.accessToken != null | ||
| && Instant.now().isBefore(this.expiryTime.minusSeconds(TOKEN_REFRESH_BUFFER_SECONDS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think it would be slightly clearer if you reverse the logic. Feel free to ignore this if you disagree
// Current time + buffer < expirationTime = does not need a refresh
Instant.now().plusSecond(TOKEN_REFRESH_BUFFER_SECONDS).isBefore(this.expiryTime)
lqiu96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Documenting the custom credential supplier for authenticating:
AWS Workloads.
Okta Workloads.