Spring Security
  1. Spring Security
  2. SEC-1460

Add strategy for defining OpenID fetch attributes based on the identifier

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 3.1.0.M1
    • Component/s: OpenID
    • Labels:
      None

      Description

      Since different OpenID providers support different attributes, it would make sense to allow custmization of the fetch request depending on whether Google, Yahoo or whatever is being used to authenticate. An "OpenIDAttributeFactory" could be added which determines the attribute list based on the identifier (e.g. with a pattern match). The existing namespace schema could then be expanded to allow multiple <attribute-exchange> elements, each with a separate regex, e.g.

      <attribute-exchange identifer="https://www.google.com/.*">
      <openid-attribute name="email" type="http://axschema.org/contact/email" required="true" count="1"/>
      <openid-attribute name="firstname" type="http://axschema.org/namePerson/first" required="true" />
      <openid-attribute name="lastname" type="http://axschema.org/namePerson/last" required="true" />
      </attribute-exchange>
      <attribute-exchange identifer="https://me.yahoo.com/.*">
      <openid-attribute name="email" type="http://axschema.org/contact/email" required="true" count="1"/>
      <openid-attribute name="fullname" type="http://axschema.org/namePerson" required="true" />
      </attribute-exchange>

        Issue Links

          Activity

          Hide
          Luke Taylor added a comment -

          Added AxFetchListFactory (see source commit message for more details).

          Show
          Luke Taylor added a comment - Added AxFetchListFactory (see source commit message for more details).

            People

            • Assignee:
              Luke Taylor
              Reporter:
              Luke Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: