Author: prabath
Date: Wed Jan 9 11:31:00 2008
New Revision: 12084
Log:
OpenID integration
Modified:
trunk/solutions/identity/modules/token-verifier-core/src/main/java/org/wso2/solutions/identity/openid/relyingparty/OpenIDConsumer.java
Modified:
trunk/solutions/identity/modules/token-verifier-core/src/main/java/org/wso2/solutions/identity/openid/relyingparty/OpenIDConsumer.java
==============================================================================
---
trunk/solutions/identity/modules/token-verifier-core/src/main/java/org/wso2/solutions/identity/openid/relyingparty/OpenIDConsumer.java
(original)
+++
trunk/solutions/identity/modules/token-verifier-core/src/main/java/org/wso2/solutions/identity/openid/relyingparty/OpenIDConsumer.java
Wed Jan 9 11:31:00 2008
@@ -41,26 +41,26 @@
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.EMAIL_NS,
IdentityConstants.OpenId.ExchangeAttributes.EMAIL);
-
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.FIRST_NAME_NS,
- IdentityConstants.OpenId.ExchangeAttributes.FIRST_NAME);
-
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.LAST_NAME_NS,
- IdentityConstants.OpenId.ExchangeAttributes.LAST_NAME);
-
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.FIRST_NAME_NS,
- IdentityConstants.OpenId.ExchangeAttributes.FULL_NAME);
-
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.NICK_NAME_NS,
- IdentityConstants.OpenId.ExchangeAttributes.NICK_NAME);
- attributes.put(IdentityConstants.OpenId.ExchangeAttributes.PHONE_NS,
- IdentityConstants.OpenId.ExchangeAttributes.PHONE);
- attributes.put(IdentityConstants.OpenId.ExchangeAttributes.ADDRESS_NS,
- IdentityConstants.OpenId.ExchangeAttributes.ADDRESS);
+
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.GIVEN_NAME_NS,
+ IdentityConstants.OpenId.ExchangeAttributes.GIVEN_NAME);
+ attributes.put(IdentityConstants.OpenId.ExchangeAttributes.SURNAME_NS,
+ IdentityConstants.OpenId.ExchangeAttributes.SURNAME);
+
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.HOME_PHONE_NS,
+ IdentityConstants.OpenId.ExchangeAttributes.HOME_PHONE);
+ attributes.put(IdentityConstants.OpenId.ExchangeAttributes.WORK_PHONE,
+ IdentityConstants.OpenId.ExchangeAttributes.WORK_PHONE_NS);
+
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.MOBILE_PHONE,
+ IdentityConstants.OpenId.ExchangeAttributes.MOBILE_PHONE_NS);
+
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.STREET_ADDRESS_NS,
+ IdentityConstants.OpenId.ExchangeAttributes.STREET_ADDRESS);
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.CITY_NS,
- IdentityConstants.OpenId.ExchangeAttributes.CITY);
- attributes.put(IdentityConstants.OpenId.ExchangeAttributes.ZIP_CODE_NS,
- IdentityConstants.OpenId.ExchangeAttributes.ZIP_CODE);
+ IdentityConstants.OpenId.ExchangeAttributes.CITY);
+
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.POSTAL_CODE_NS,
+ IdentityConstants.OpenId.ExchangeAttributes.POSTAL_CODE);
attributes.put(IdentityConstants.OpenId.ExchangeAttributes.COUNTRY_NS,
- IdentityConstants.OpenId.ExchangeAttributes.COUNTRY);
- attributes.put(IdentityConstants.OpenId.ExchangeAttributes.BLOG_NS,
- IdentityConstants.OpenId.ExchangeAttributes.BLOG);
+ IdentityConstants.OpenId.ExchangeAttributes.COUNTRY);
+ attributes.put(IdentityConstants.OpenId.ExchangeAttributes.STATE_NS,
+ IdentityConstants.OpenId.ExchangeAttributes.STATE);
}
/**
@@ -199,16 +199,16 @@
authSuccess.getIdentity());
// OpenID Attribute Exchange 1.0 - Draft 07.
- if (authSuccess.hasExtension(IdentityConstants.OpenId.NS_AX)) {
+ if
(authSuccess.hasExtension(IdentityConstants.OpenId.ExchangeAttributes.NS_AX)) {
FetchResponse fetchResp = null;
fetchResp = (FetchResponse) authSuccess
- .getExtension(IdentityConstants.OpenId.NS_AX);
+
.getExtension(IdentityConstants.OpenId.ExchangeAttributes.NS_AX);
session.setAttribute("emailFromFetch", fetchResp
.getAttributeValues("email").get(0));
- } else if
(authSuccess.hasExtension(IdentityConstants.OpenId.NS_SREG)){
+ } else if
(authSuccess.hasExtension(IdentityConstants.OpenId.SimpleRegAttributes.NS_SREG)){
// OpenID Simple Registration Extension 1.1 - Draft 1.
SRegResponse sregResp = (SRegResponse) authSuccess
- .getExtension(IdentityConstants.OpenId.NS_SREG);
+
.getExtension(IdentityConstants.OpenId.SimpleRegAttributes.NS_SREG);
request
.setAttribute(
IdentityConstants.OpenId.SimpleRegAttributes.NICK_NAME,
@@ -345,6 +345,7 @@
MessageExtension extension = null;
authSuccess = (AuthSuccess) authResponse;
+
extension = authSuccess.getExtension(AxMessage.OPENID_NS_AX);
if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)
_______________________________________________
Identity-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/identity-dev