cleaned up components/identity-extensions

merge-requests/767/head
Amalka Subasinghe 4 years ago
parent 8590268db4
commit bf074061f1

@ -87,11 +87,10 @@
org.wso2.carbon.device.mgt.oauth.extensions.*
</Export-Package>
<Import-Package>
<!--org.wso2.carbon.identity.oauth2.grant.jwt;version="${carbon.identity.jwt.grant.version.range}",-->
org.wso2.carbon.identity.oauth2.grant.jwt;version="${carbon.identity.jwt.grant.version.range}",
org.apache.commons.lang,
org.apache.commons.logging,
org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.osgi.service.component,
org.wso2.carbon.identity.application.common.model;version="${carbon.identity.framework.version.range}",
org.wso2.carbon.identity.application.common;version="${carbon.identity.framework.version.range}",
org.wso2.carbon.identity.application.mgt.*;version="${carbon.identity.framework.version.range}",
@ -114,10 +113,6 @@
org.apache.oltu.oauth2.common.validators,
org.apache.commons.lang3.tuple,
</Import-Package>
<!--<Embed-Dependency>-->
<!--</Embed-Dependency>-->
</instructions>
</configuration>
</plugin>

@ -21,6 +21,7 @@ package org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.keymgt.ScopesIssuer;
import org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.oauth.validator.LocalOAuthValidator;
import org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.oauth.validator.OAuthValidationResponse;
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
@ -57,8 +58,8 @@ public class AccessTokenGrantHandler extends AbstractAuthorizationGrantHandler {
}
@Override
public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
return super.validateScope(tokReqMsgCtx);
public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) {
return ScopesIssuer.getInstance().setScopes(tokReqMsgCtx);
}
@Override

@ -20,10 +20,14 @@ package org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.keymgt.ScopesIssuer;
import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.grant.jwt.JWTBearerGrantHandler;
import org.wso2.carbon.identity.oauth2.model.RequestParameter;
import org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
/**
* This sets up user with tenant aware username.
@ -34,8 +38,8 @@ public class ExtendedJWTGrantHandler extends JWTBearerGrantHandler {
private static final String TENANT_DOMAIN_KEY = "tenantDomain";
@Override
public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
return super.validateScope(tokReqMsgCtx);
public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) {
return ScopesIssuer.getInstance().setScopes(tokReqMsgCtx);
}
@Override

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.keymgt.ScopesIssuer;
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext;
@ -34,8 +35,8 @@ public class ExtendedSAML2BearerGrantHandler extends SAML2BearerGrantHandler {
private static Log log = LogFactory.getLog(ExtendedSAML2BearerGrantHandler.class);
@Override
public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
return super.validateScope(tokReqMsgCtx);
public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) {
return ScopesIssuer.getInstance().setScopes(tokReqMsgCtx);
}
@Override

@ -109,8 +109,8 @@
org.apache.commons.httpclient,
org.apache.commons.logging,
org.apache.commons.codec.binary;version="${commons-codec.wso2.osgi.version.range}",
org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.osgi.framework,
org.osgi.service.component,
org.wso2.carbon.core.security,
org.wso2.carbon.core.services.authentication,
org.wso2.carbon.utils.multitenancy,

@ -33,8 +33,6 @@
<url>http://wso2.org</url>
<modules>
<!--<module>org.wso2.carbon.identity.authenticator.backend.oauth</module>-->
<!--<module>org.wso2.carbon.device.mgt.oauth.extensions</module>-->
<module>org.wso2.carbon.identity.jwt.client.extension</module>
</modules>

Loading…
Cancel
Save