-
Notifications
You must be signed in to change notification settings - Fork 0
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
Client-Auth files #21
base: master
Are you sure you want to change the base?
Conversation
* client info. | ||
*/ | ||
|
||
const OICCli = require('../init.js').OICCli; |
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.
Unused constant. Please remove for now.
*/ | ||
|
||
const OICCli = require('../init.js').OICCli; | ||
const utf8 = require('utf8'); |
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.
Unused constant. Please remove for now.
|
||
const OICCli = require('../init.js').OICCli; | ||
const utf8 = require('utf8'); | ||
const base64url = require('base64url'); |
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.
Unused constant. Please remove for now.
} | ||
} | ||
|
||
function validServiceContext(serviceContext, when) { |
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.
The name of this function and what it does is not really intuitive. At first I thought it will give a valid ServiceContext object, but when I looked at the code it's checking whether client_secret_expires_at
is set and still before the given time.
How about changing the name into something more meaningful? E.g. isValidServiceContext
or isServiceContextValid
?
It also might make sense to move this function into the ServiceContext
class or is there a reason to have it here?
} | ||
|
||
function validServiceContext(serviceContext, when) { | ||
let eta = serviceContext['client_secret_expires_at'] || 0; |
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.
Would it make sense to have client_secret_expires_at
defined as a member in ServiceContext
, and access it like `serviceContext.client_secret_expires_at? Or is there a reason to access it like it is now?
No description provided.