-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: ACNA-1854 - add getAccessTokenByClientCredentials function #110
Conversation
Codecov Report
@@ Coverage Diff @@
## master #110 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 481 487 +6
Branches 68 68
=========================================
+ Hits 481 487 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@shazron changes look good. I think we should also update the Readme with example code. |
@@ -372,7 +372,7 @@ class Ims { | |||
* {@link toTokenResult} or rejects to an error message. | |||
*/ | |||
async getAccessTokenByClientCredentials (clientId, clientSecret, orgId, scopes) { | |||
aioLogger.debug('getAccessTokenServerToServer(%s, %s, %s, %o)', clientId, clientSecret, orgId, scopes = []) | |||
aioLogger.debug('getAccessTokenByClientCredentials(%s, %s, %s, %o)', clientId, clientSecret, orgId, scopes = []) |
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.
please don’t log the clientSecret, this is sensitive info like a password
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.
Thanks -- I'll truncate it to the last n chars.
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.
actually this should be ok since we are logging in a debug context only. However it seems that this type of logging is not isolated to just this function, but quite a few functions as well (as well as logging of the tokens, not just secrets). I'll bring this up for dev discussion as a separate issue for resolution: #121
@shazron Can we get a release with this soon? |
Changes 📦
Ims.getAccessTokenByClientCredentials
function -- this is an OAuth call with client credentials grant type, to get an access token.Pre-requisites 🔖
Pending 🚧
How Has This Been Tested? 🔧
Types of changes
Checklist: