-
Notifications
You must be signed in to change notification settings - Fork 55
Add oauthaccesstokens to API_PREFERRED_VERSIONS, update deleteTokenLogoutService #267
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
Add oauthaccesstokens to API_PREFERRED_VERSIONS, update deleteTokenLogoutService #267
Conversation
benjaminapetersen
commented
Dec 8, 2017
- APIService in deleteTokenLogoutService would create a circular dependency
9edfbf4
to
1e48ef1
Compare
@@ -6,7 +6,8 @@ angular.module('openshiftCommonServices') | |||
|
|||
this.$get = function($q, $injector, Logger) { | |||
var authLogger = Logger.get("auth"); | |||
|
|||
// Using APIService creates a circular dependency |
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.
Does this work?
var APIService = $injector.get("APIService");
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.
Yeah good call, like DataService
below, updating
1e48ef1
to
4828d46
Compare
updated |
@@ -19,11 +21,12 @@ angular.module('openshiftCommonServices') | |||
|
|||
// Lazily get the data service. Can't explicitly depend on it or we get circular dependencies. | |||
var DataService = $injector.get('DataService'); | |||
var oAuthAccessTokensVersion = $injector.get('APIService').getPreferredVersion('oauthaccesstokens'); |
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.
Nit: I find this hard to read as one statement. I'd prefer something like...
// Lazily get the API service and data service. Can't explicitly depend on them or we get circular dependencies.
var APIService = $injector.get('APIService');
var DataService = $injector.get('DataService');
var oAuthAccessTokensVersion = APIService.getPreferredVersion('oauthaccesstokens');
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.
I'm fine with that. updating.
4828d46
to
ad4b4d7
Compare
rebased |
@@ -18,12 +20,14 @@ angular.module('openshiftCommonServices') | |||
} | |||
|
|||
// Lazily get the data service. Can't explicitly depend on it or we get circular dependencies. |
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.
do you mind updating the comment since it applies to both services?
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.
Sure thing!
ad4b4d7
to
88bfeee
Compare
updated |
@@ -25,6 +25,7 @@ angular.module('openshiftCommonServices') | |||
imagestreamimages: {group: 'image.openshift.io', version: 'v1', resource: 'imagestreamimages' }, | |||
imagestreamimports: {group: 'image.openshift.io', version: 'v1', resource: 'imagestreamimports' }, | |||
limitranges: {version: 'v1', resource: 'limitranges' }, | |||
oauthaccesstokens: {version: 'v1', resource: 'oauthaccesstokens' }, |
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.
group: oauth.openshift.io/v1
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.
ah, thx. got it.
88bfeee
to
e10a1fa
Compare
Think we are good on this one. |