Spring Security
  1. Spring Security
  2. SEC-889

Can't set a SecurityContextHolderStrategy instance for SecurityContextHolder directly

    Details

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

      Description

      Currently i can put a custom strategy to hold the SecurityContext via SecurityContextHolder.setStrategyName(String). By SecurityContextHolder.initialize() the class try to load the custom strategy. When the custom class isn't in the classpath i get a ClassNotFoundException. I found no way to set the instance directly.

        Activity

        Hide
        Luke Taylor added a comment -

        I'm not quite clear what the problem is? Could you expand a bit on your requirements?

        For example, why would your custom class not be on the classpath?

        Show
        Luke Taylor added a comment - I'm not quite clear what the problem is? Could you expand a bit on your requirements? For example, why would your custom class not be on the classpath?
        Hide
        Jürgen Heil added a comment -

        My class ist not in the classpath because i'm using an OSGi-Container. I solved it by implementing a fragment bundle to your security-bundle.

        Show
        Jürgen Heil added a comment - My class ist not in the classpath because i'm using an OSGi-Container. I solved it by implementing a fragment bundle to your security-bundle.
        Hide
        Luke Taylor added a comment -

        OK - that sounds like a suitable resolution so I'll close as "won't fix". If there are any other comments or suggestions, please enter them here.

        Show
        Luke Taylor added a comment - OK - that sounds like a suitable resolution so I'll close as "won't fix". If there are any other comments or suggestions, please enter them here.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Jürgen Heil
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: