3

I'm migrating a Spring Boot project from boot 1.5.x to 2.0.x.

In the 1.5.x project I see that the following dependency is being used:

dependencies {

  ...
  compile("org.springframework.security:spring-security-jwt")
  ...
}

The version of the spring-security-jwt is managed by Spring and I can verify that here. Namely:

<spring-security-jwt.version>1.0.9.RELEASE</spring-security-jwt.version>

The same dependency fails to resolve when I move to Boot 2 because it is no longer managed by Spring. I can verify that here...

Is this a bug or it is removed and included in another lib? Somehow I can't find clues in the docs... Shall I manage the version manually now?

4
  • i used org.springframework.security:spring-security-jwt:1.0.9.RELEASE version in spring boot 2. got no problem Commented Jul 27, 2018 at 10:49
  • 1
    Yeah, it seems that there is no problem... I'm just getting nervous when I see explicit versioning in my gradle files :-) Thus I wonder if the lib is moved somewhere or they skipped it from the Boot2 dependencies for some reason. Commented Jul 27, 2018 at 11:01
  • @LachezarBalev did you come up with something better in the end? I see you approved the answer, but it doesn't tell us how to get a JWT library! Commented Jan 26, 2019 at 23:39
  • Well, I still use org.springframework.security:spring-security-jwt:1.0.9.RELEASE :( It was really cheap to do so, I'm not very proud but it works perfectly OK for me so far (Spring 2.0.+) Commented Jan 27, 2019 at 18:51

1 Answer 1

1

The spring-security-jwt (and OAuth as well I guess) are now obsolete. Spring Security 5 added that support to the core library instead of an extension of the framework.

See here for a list of tickets related to the core JWT and OAuth support.

So in short you don't need that dependency anymore, although if you have custom filters and functionality build around that it would require using different classes/packages and features.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.