Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 3.0.0 M1
    • Component/s: Core
    • Labels:
      None

      Description

      The methods on this class are redundant and inflexible as they are static - the principal from the authentication should just be passed directly to the SessionRegistry, allowing the implementation to interpret it as it wishes. Likewise, the "obtainSessionId..." method should be art of ConcurrentSessionControllerImpl. The error message for a missing authentication "details" object should also be improved.

        Activity

        Hide
        Luke Taylor added a comment -

        I've removed the class and inlined the methods. This also means that the actual principal object will be used as the key into the map (normally a UserDetails object). This could be useful when accessing the SessionRegistry for other purposes (e.g. in a UI). It also means that in cases where the username in the object is not unique (e.g. because there is an additional "company" field, for example, which differentiates between them) then there will be no danger of users overwriting each other's data (provided equals and hashcode methods are properly implemented).

        Show
        Luke Taylor added a comment - I've removed the class and inlined the methods. This also means that the actual principal object will be used as the key into the map (normally a UserDetails object). This could be useful when accessing the SessionRegistry for other purposes (e.g. in a UI). It also means that in cases where the username in the object is not unique (e.g. because there is an additional "company" field, for example, which differentiates between them) then there will be no danger of users overwriting each other's data (provided equals and hashcode methods are properly implemented).

          People

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

            Dates

            • Created:
              Updated:
              Resolved: