-
Notifications
You must be signed in to change notification settings - Fork 67
Add SetAuthentication function to authenticate 'passively' #516
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
base: master
Are you sure you want to change the base?
Conversation
6092cc1 to
0ee47ec
Compare
0ee47ec to
131a524
Compare
|
@luispresuelVenafi / @rvelaVenafi / @marcos-albornoz / @EduardoVV - Any chance you might be able to review this PR from @inteon? |
6824cf5 to
f32d0fd
Compare
| apiKey string | ||
| accessToken string | ||
| verbose bool | ||
| Identity identity |
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.
Identity was not used anywhere.
| apiKey string | ||
| accessToken string | ||
| verbose bool | ||
| user *userDetails |
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.
user was not meaningfully used anywhere.
7e59ddb to
940ad3e
Compare
| // 3. API key. Get user to test authentication | ||
| // 3. API key. Assign it to connector | ||
| c.apiKey = auth.APIKey | ||
| url := c.getURL(urlResourceUserAccounts) |
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.
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() |
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.
These calls have been moved to the Authenticate function.
…ending a self-check request to the server) Signed-off-by: Tim Ramlot <[email protected]>
940ad3e to
f7f58a6
Compare
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.