Skip to content

Conversation

@inteon
Copy link
Contributor

@inteon inteon commented Sep 5, 2024

When using vcert as a library, being able to create a vcert client without sending a self-check request to the server can help reduce unnecessary API calls.
It gives the caller more control over when the self-checks occur.
Eg. when creating clients dynamically based on cached credentials.

@hawksight
Copy link

@luispresuelVenafi / @rvelaVenafi / @marcos-albornoz / @EduardoVV - Any chance you might be able to review this PR from @inteon?

@inteon inteon force-pushed the add_passive_auth_option branch 3 times, most recently from 6824cf5 to f32d0fd Compare January 3, 2025 09:06
apiKey string
accessToken string
verbose bool
Identity identity
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identity was not used anywhere.

apiKey string
accessToken string
verbose bool
user *userDetails
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user was not meaningfully used anywhere.

@inteon inteon force-pushed the add_passive_auth_option branch 2 times, most recently from 7e59ddb to 940ad3e Compare February 19, 2025 10:04
// 3. API key. Get user to test authentication
// 3. API key. Assign it to connector
c.apiKey = auth.APIKey
url := c.getURL(urlResourceUserAccounts)
Copy link
Contributor Author

@inteon inteon Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check has been replaced by the getUserDetails function which is called by Authenticate.

c.apiKey = resp.APIKey

if c.client != nil {
c.Identity, err = c.retrieveSelfIdentity()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These calls have been moved to the Authenticate function.

…ending a self-check request to the server)

Signed-off-by: Tim Ramlot <[email protected]>
@inteon inteon force-pushed the add_passive_auth_option branch from 940ad3e to f7f58a6 Compare February 28, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants