Spring Security
  1. Spring Security
  2. SEC-1483

Change org.springframework.security.core.userdetails.User constructor to accept Collection<? extends GrantedAuthority>

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.0.3, 3.1.0.M1
    • Component/s: Core
    • Labels:
      None

      Description

      Currently the User constructor takes a Collection<GrantedAuthority> as a parameter. If it were to take Collection<? extends GrantedAuthority> it would mean that users would not have to implement a special method just to generate the collection as that type. The change would be trivial.

        Activity

        Hide
        Luke Taylor added a comment -

        Added to 3.0 and master branches.

        Show
        Luke Taylor added a comment - Added to 3.0 and master branches.
        Hide
        Johnathon added a comment -

        It would seem that UserDetails itself got left behind in this modification, as it would seem to make sense to also allow any implementing classes of UserDetails to accept <? extends GrantedAuthority> on the getAuthorities method definition as well... Would it make sens to reopen this task, or create a separate one?

        Show
        Johnathon added a comment - It would seem that UserDetails itself got left behind in this modification, as it would seem to make sense to also allow any implementing classes of UserDetails to accept <? extends GrantedAuthority> on the getAuthorities method definition as well... Would it make sens to reopen this task, or create a separate one?

          People

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

            Dates

            • Created:
              Updated:
              Resolved: