[gatein-issues] [JBoss JIRA] (GTNPORTAL-3414) Oauth improvement: enable developer change the way to generate gatein user for each oauth provider via extension
Tuyen Nguyen The (JIRA)
issues at jboss.org
Tue Mar 18 00:14:10 EDT 2014
[ https://issues.jboss.org/browse/GTNPORTAL-3414?focusedWorklogId=12430921&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-12430921 ]
Tuyen Nguyen The logged work on GTNPORTAL-3414:
-----------------------------------------------
Author: Tuyen Nguyen The
Created on: 18/Mar/14 12:13 AM
Start Date: 17/Mar/14 12:12 AM
Worklog Time Spent: 2 hours
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 1 hour)
Time Spent: 7 hours (was: 5 hours)
Worklog Id: (was: 12430921)
> Oauth improvement: enable developer change the way to generate gatein user for each oauth provider via extension
> ----------------------------------------------------------------------------------------------------------------
>
> Key: GTNPORTAL-3414
> URL: https://issues.jboss.org/browse/GTNPORTAL-3414
> Project: GateIn Portal
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Tuyen Nguyen The
> Assignee: Trong Tran
> Attachments: linkedin-registration.png
>
> Original Estimate: 4 hours
> Time Spent: 7 hours
> Remaining Estimate: 0 minutes
>
> When i register new account with LinkedIn, i see a registration form with random-string username prefilled (see attachment)
> It's because LinkedIn does not provide username as unique attribute for each user, so we have to get userid instead of username, and this is a random-string by LinkedIn
> Now, We can improvement method OAuthUtils#convertOAuthPrincipalToGateInUser() and customize the way to convert oauth-principal to gatein user for linkedIn.
> But when someone provide other oauth integration via extension, he can not customize OAuthUtils#convertOAuthPrincipalToGateInUser() method to generate gatein user by the way that oauth should do.
> So we should enable developer change the way to generate gatein user for each oauth provider via extension.
> To enable developer change the way to generate gatein user via extension, we will:
> - Introduce OAuthUserGenerator service and it can add OAuthUserGeneratorPlugin by extension. This service will response to generate gatein user from oauth-principal
> - Method OAuthUserGenerator#generateGateInUser(OAuthPrincipal principal) will do:
> + Find OAuthUserGeneratorPlugin by oauthProviderType,
> + If found plugin for this oauth provider it will delegate method OAuthUserGeneratorPlugin#generateGateInUser()
> + If not found, it will delegate to OAuthUtils#convertOAuthPrincipalToGateInUser() as default.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list