Uploaded image for project: 'GateIn Portal'
  1. GateIn Portal
  2. GTNPORTAL-3414

Be able to intercept and process oauth principal into gatein user according to provider types

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.8.0.Beta01
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                trong.tran Trong Tran
                Reporter:
                nttuyen266 Tuyen Nguyen The
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 hours
                  7h