Hi Prabath,
Here are the changes. Probably you can mask these off by extending. This
was done quickly and it worked.
Index:
oauth-2.0/oauth2-authzserver/src/main/java/org/apache/amber/oauth2/as/validator/SAML20BearerAssertionValidator.java
===================================================================
---
oauth-2.0/oauth2-authzserver/src/main/java/org/apache/amber/oauth2/as/validator/SAML20BearerAssertionValidator.java
(revision
0)
+++
oauth-2.0/oauth2-authzserver/src/main/java/org/apache/amber/oauth2/as/validator/SAML20BearerAssertionValidator.java
(revision
15751)
@@ -0,0 +1,12 @@
+package org.apache.amber.oauth2.as.validator;
+
+import org.apache.amber.oauth2.common.OAuth;
+import org.apache.amber.oauth2.common.validators.AbstractValidator;
+
+import javax.servlet.http.HttpServletRequest;
+
+public class SAML20BearerAssertionValidator extends
AbstractValidator<HttpServletRequest> {
+ public SAML20BearerAssertionValidator() {
+ requiredParams.add(OAuth.OAUTH_ASSERTION);
+ }
+}
Index:
oauth-2.0/oauth2-authzserver/src/main/java/org/apache/amber/oauth2/as/request/OAuthTokenRequest.java
===================================================================
---
oauth-2.0/oauth2-authzserver/src/main/java/org/apache/amber/oauth2/as/request/OAuthTokenRequest.java
(revision
15233)
+++
oauth-2.0/oauth2-authzserver/src/main/java/org/apache/amber/oauth2/as/request/OAuthTokenRequest.java
(revision
15751)
@@ -27,6 +27,7 @@
import org.apache.amber.oauth2.as.validator.ClientCredentialValidator;
import org.apache.amber.oauth2.as.validator.PasswordValidator;
import org.apache.amber.oauth2.as.validator.RefreshTokenValidator;
+import org.apache.amber.oauth2.as.validator.SAML20BearerAssertionValidator;
import org.apache.amber.oauth2.common.OAuth;
import org.apache.amber.oauth2.common.exception.OAuthProblemException;
import org.apache.amber.oauth2.common.exception.OAuthSystemException;
@@ -53,6 +54,7 @@
validators.put(GrantType.CLIENT_CREDENTIALS.toString(),
ClientCredentialValidator.class);
validators.put(GrantType.AUTHORIZATION_CODE.toString(),
AuthorizationCodeValidator.class);
validators.put(GrantType.REFRESH_TOKEN.toString(),
RefreshTokenValidator.class);
+ validators.put(GrantType.SAML20_BEARER_ASSERTION.toString(),
SAML20BearerAssertionValidator.class);
String requestTypeValue = getParam(OAuth.OAUTH_GRANT_TYPE);
if (OAuthUtils.isEmpty(requestTypeValue)) {
throw OAuthUtils.handleOAuthProblemException("Missing
grant_type parameter value");
@@ -84,4 +86,8 @@
return getParam(OAuth.OAUTH_GRANT_TYPE);
}
+ public String getAssertion() {
+ return getParam(OAuth.OAUTH_ASSERTION);
+ }
+
}
Index:
oauth-2.0/oauth2-common/src/main/java/org/apache/amber/oauth2/common/message/types/GrantType.java
===================================================================
---
oauth-2.0/oauth2-common/src/main/java/org/apache/amber/oauth2/common/message/types/GrantType.java
(revision
15233)
+++
oauth-2.0/oauth2-common/src/main/java/org/apache/amber/oauth2/common/message/types/GrantType.java
(revision
15751)
@@ -31,7 +31,8 @@
AUTHORIZATION_CODE("authorization_code"),
PASSWORD("password"),
REFRESH_TOKEN("refresh_token"),
- CLIENT_CREDENTIALS("client_credentials");
+ CLIENT_CREDENTIALS("client_credentials"),
+
SAML20_BEARER_ASSERTION("urn:ietf:params:oauth:grant-type:saml2-bearer");
private String grantType;
-Chintana
On Sat, Oct 13, 2012 at 10:39 PM, Prabath Siriwardena <[email protected]>wrote:
> Hi Lalaji,
>
> What are the changes we did for amber..?
>
> Thanks & regards,
> -Prabath
>
>
> On Fri, Oct 12, 2012 at 4:40 PM, Lalaji Sureshika <[email protected]> wrote:
>
>> Hi Ajith,
>>
>> I have branched dependencies/amber dependencies/orbit/amber in to new
>> version[0.22.1358727-wso2v2/ 0.22.1358727.wso2v2] and updated the patch
>> release pom and identity oauth 4.0.2 bundle as well.Take a svn up of
>> platform above locations and try.
>>
>> Thanks;
>>
>> On Fri, Oct 12, 2012 at 4:23 PM, Ajith Vitharana <[email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I'm getting following build failure in latest branch.
>>>
>>>
>>> [INFO] BUILD FAILURE
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 30:23.158s
>>> [INFO] Finished at: Fri Oct 12 17:19:25 IST 2012
>>> [INFO] Final Memory: 1421M/1829M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
>>> (default-compile) on project org.wso2.carbon.identity.oauth: Compilation
>>> failure: Compilation failure:
>>> [ERROR]
>>> /home/ajithn/wso2/build/branches/releases/4.0.2/platform/4.0.0/components/identity/org.wso2.carbon.identity.oauth/4.0.2/src/main/java/org/wso2/carbon/identity/oauth2/token/AccessTokenIssuer.java:[81,40]
>>> cannot find symbol
>>> [ERROR] symbol : variable SAML20_BEARER_ASSERTION
>>> [ERROR] location: class
>>> org.apache.amber.oauth2.common.message.types.GrantType
>>> [ERROR]
>>> /home/ajithn/wso2/build/branches/releases/4.0.2/platform/4.0.0/components/identity/org.wso2.carbon.identity.oauth/4.0.2/src/main/java/org/wso2/carbon/identity/oauth/config/OAuthServerConfiguration.java:[450,37]
>>> cannot find symbol
>>> [ERROR] symbol : variable SAML20_BEARER_ASSERTION
>>> [ERROR] location: class
>>> org.apache.amber.oauth2.common.message.types.GrantType
>>> [ERROR] -> [Help 1]
>>> [ERROR]
>>> [ERROR] To see the full stack trace of the errors, re-run Maven with the
>>> -e switch.
>>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>>> [ERROR]
>>> [ERROR] For more information about the errors and possible solutions,
>>> please read the following articles:
>>> [ERROR] [Help 1]
>>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>>> [ERROR]
>>> [ERROR] After correcting the problems, you can resume the build with the
>>> command
>>> [ERROR] mvn <goals> -rf :org.wso2.carbon.identity.oauth
>>>
>>>
>>> Thanks
>>> Ajithn
>>>
>>>
>>> --
>>> Ajith Vitharana.
>>> WSO2 Inc. - http://wso2.org
>>> Email : [email protected]
>>> Mobile : +94714631794
>>>
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Lalaji Sureshika
>> Software Engineer; Development Technologies Team;WSO2, Inc.;
>> http://wso2.com/
>> email: [email protected]; cell: +94 71 608 6811
>> blog: http://lalajisureshika.blogspot.com
>>
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks & Regards,
> Prabath
>
> Mobile : +94 71 809 6732
>
> http://blog.facilelogin.com
> http://RampartFAQ.com
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
Chintana Wilamuna
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware
phone: +94 72 145 4545
blog: http://engwar.com/
photos: http://flickr.com/photos/chintana
linkedin: http://www.linkedin.com/in/engwar
twitter: twitter.com/std_err
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev