-
Notifications
You must be signed in to change notification settings - Fork 145
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 support to access organization resources in tenant perspective #295
Add support to access organization resources in tenant perspective #295
Conversation
pom.xml
Outdated
@@ -385,8 +385,8 @@ | |||
<osgi.util.tracker.imp.pkg.version.range>[1.5.1, 2.0.0)</osgi.util.tracker.imp.pkg.version.range> | |||
|
|||
<!-- Carbon Kernel version --> | |||
<carbon.kernel.version>4.9.17</carbon.kernel.version> | |||
<carbon.kernel.feature.version>4.9.0</carbon.kernel.feature.version> | |||
<carbon.kernel.version>4.10.24</carbon.kernel.version> |
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.
Need to update this with the new release version with the changes in wso2/carbon-kernel#4104
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.
Updated to the latest kernel release 4.10.26[1]
...c/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/wso2/carbon/identity/context/rewrite/valve/TenantContextRewriteValve.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/wso2/carbon/identity/context/rewrite/valve/TenantContextRewriteValve.java
Show resolved
Hide resolved
693f0cf
to
85ded2d
Compare
...c/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java
Outdated
Show resolved
Hide resolved
7b7ab3b
to
095707b
Compare
095707b
to
fddecc4
Compare
@@ -173,8 +176,21 @@ protected AuthenticationResult doAuthenticate(MessageContext messageContext) { | |||
ServiceProvider serviceProvider = null; | |||
String serviceProviderName = null; | |||
String serviceProviderUUID = null; | |||
String accessingTenantDomain = null; |
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.
applicationResidentTenantDomain
serviceProvider = OAuth2Util.getServiceProvider( | ||
oAuth2IntrospectionResponseDTO.getClientId(), accessingTenantDomain); | ||
boolean isSharedApp = Arrays.stream(serviceProvider.getSpProperties()).anyMatch( | ||
property -> "isAppShared".equals(property.getName()) && |
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.
isAppShared - > Use a contant
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.
Use the existing contant
accessingTenantDomain = authorizedUser.getTenantDomain(); | ||
serviceProvider = OAuth2Util.getServiceProvider( | ||
oAuth2IntrospectionResponseDTO.getClientId(), accessingTenantDomain); | ||
boolean isSharedApp = Arrays.stream(serviceProvider.getSpProperties()).anyMatch( |
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.
boolean isSharedApp = Arrays.stream(serviceProvider.getSpProperties()).anyMatch( | |
boolean isB2BSharedApp = Arrays.stream(serviceProvider.getSpProperties()).anyMatch( |
serviceProviderTenantDomain = | ||
OAuth2Util.getTenantDomainOfOauthApp(oAuth2IntrospectionResponseDTO.getClientId()); | ||
if (StringUtils.isNotEmpty(accessingTenantDomain)) { | ||
serviceProviderTenantDomain = |
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.
Remove the method because we are extracting the tenant domain from above
Closing this PR since the PR is devided to two parts [1][2] [1] #298 |
Proposed changes in this pull request
/t/{tenant-domain}/o/{org-id}/api/identity/oauth2/dcr/v1.1/register
/t/{tenant-domain}/o/{org-id}/oauth2/token?scope=openid ...
When should this PR be merged