Skip to content

Instantly share code, notes, and snippets.

@4knort
Created June 5, 2018 19:58
Show Gist options
  • Save 4knort/ed5713f93b33c5c6c3f0e07d5f31e52e to your computer and use it in GitHub Desktop.
Save 4knort/ed5713f93b33c5c6c3f0e07d5f31e52e to your computer and use it in GitHub Desktop.
constructor(config) {
super();
this.logger = log.getLogger('Keyclock');
if (config.logLevel) {
this.logger.setLevel(config.logLevel);
}
this.config = config;
const {path, ...url} = this.config.url;
this.fullUrl = format({
<<<<<<< HEAD
...this.config.url,
pathname: `${config.version === 3 ? '/auth' : ''}/realms/${this.config.realm}/protocol/openid-connect/token`
=======
...url,
pathname: `${path || ''}realms/${this.config.realm}/protocol/openid-connect/token`
>>>>>>> 5676666c3d253297946437d809071e3353eca77a
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment