Uploaded image for project: 'CAS Server'
  1. CAS Server
  2. CAS-1001

TicketOrCredentialPrincipalResolver results in ClassCastException when implementing own UserDetails implementation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.8
    • Fix Version/s: 3.4.9
    • Component/s: Infrastructure
    • Labels:
      None

      Description

      The method

      protected String resolveFromInternal(final JoinPoint joinPoint)

      should be casting the authentication.getPrincipal() to a UserDetails object instead of a User object.
      Original code:

      return ((User) authentication.getPrincipal()).getUsername();
      

      Change request:

      return ((UserDetails) authentication.getPrincipal()).getUsername();
      

        Attachments

          Activity

            People

            • Assignee:
              battags Scott Battaglia
              Reporter:
              sbelnap Scott Belnap
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: