Spring Security JWT Library

Spring Security JWT is a small utility library for encoding and decoding JSON Web Tokens. It belongs to the family of Spring Security crypto libraries that handle encoding and decoding text as a general, useful thing to be able to do.

License

License

Categories

Categories

Security
GroupId

GroupId

org.springframework.security
ArtifactId

ArtifactId

spring-security-jwt
Last Version

Last Version

1.1.1.RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Security JWT Library
Spring Security JWT is a small utility library for encoding and decoding JSON Web Tokens. It belongs to the family of Spring Security crypto libraries that handle encoding and decoding text as a general, useful thing to be able to do.
Project URL

Project URL

https://github.com/spring-projects/spring-security-oauth
Project Organization

Project Organization

SpringSource
Source Code Management

Source Code Management

https://github.com/spring-projects/spring-security-oauth

Download spring-security-jwt

How to add to project

<!-- https://jarcasting.com/artifacts/org.springframework.security/spring-security-jwt/ -->
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-jwt</artifactId>
    <version>1.1.1.RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/org.springframework.security/spring-security-jwt/
implementation 'org.springframework.security:spring-security-jwt:1.1.1.RELEASE'
// https://jarcasting.com/artifacts/org.springframework.security/spring-security-jwt/
implementation ("org.springframework.security:spring-security-jwt:1.1.1.RELEASE")
'org.springframework.security:spring-security-jwt:jar:1.1.1.RELEASE'
<dependency org="org.springframework.security" name="spring-security-jwt" rev="1.1.1.RELEASE">
  <artifact name="spring-security-jwt" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.springframework.security', module='spring-security-jwt', version='1.1.1.RELEASE')
)
libraryDependencies += "org.springframework.security" % "spring-security-jwt" % "1.1.1.RELEASE"
[org.springframework.security/spring-security-jwt "1.1.1.RELEASE"]

Dependencies

compile (1)

Group / Artifact Type Version
org.bouncycastle : bcpkix-jdk15on jar 1.64

test (3)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-all jar 1.9.5
org.jruby : jruby jar 1.7.8

Project Modules

There are no modules declared in this project.

Build Status

** Deprecation Notice **

The Spring Security OAuth project is deprecated. The latest OAuth 2.0 support is provided by Spring Security. See the OAuth 2.0 Migration Guide for further details.

About

This project provides support for using Spring Security with OAuth (1a) and OAuth2. It provides features for implementing both consumers and providers of these protocols using standard Spring and Spring Security programming models and configuration idioms.

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Getting Started

Download or clone from GIT and then use Maven (3.0.*) and Java (1.6 or better):

$ git clone ...
$ mvn install -P bootstrap

Use the bootstrap profile only the first time - it enables some repositories that can't be exposed in the poms by default. You may find it useful to add this profile to your local settings.xml.

You need to run Redis to get the build to work. You can install this using homebrew. Without Redis running the build will lots of Jedis connection exceptions

SpringSource ToolSuite users (or Eclipse users with the latest m2eclipse plugin) can import the projects as existing Maven projects.

Spring Security OAuth is released under the terms of the Apache Software License Version 2.0 (see license.txt).

Samples

Samples and integration tests are in a subdirectory. There is a separate README there for orientation and information. Once you have installed the artifacts locally (as per the getting started instructions above) you should be able to

$ cd samples/oauth2/tonr
$ mvn tomcat7:run

and visit the app in your browser at http://localhost:8080/tonr2/ to check that it works. (This is for the OAuth 2.0 sample, for the OAuth 1.0a sample just remove the "2" from the directory path.) Integration tests require slightly different settings for Tomcat so you need to add a profile:

$ cd samples/oauth2/tonr
$ mvn integration-test -P integration

Changelog

Lists of issues addressed per release can be found in github (older releases are in JIRA).

Additional Resources

Contributing to Spring Security OAuth

Here are some ways for you to get involved in the community:

  • Get involved with the Spring community on the Spring Community Forums. Please help out on the forum by responding to questions and joining the debate.
  • Create github issues for bugs and new features and comment and vote on the ones that you are interested in.
  • Github is for social coding: if you want to write code, we encourage contributions through pull requests from forks of this repository. If you want to contribute code this way, please reference a github issue as well covering the specific issue you are addressing.
  • Watch for upcoming articles on Spring by subscribing to springframework.org

Before we accept a non-trivial patch or pull request we will need you to sign the contributor's agreement. Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests.

Code Conventions and Housekeeping

None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge.

  • Use the Spring Framework code format conventions. Import eclipse-code-formatter.xml from the root of the project if you are using Eclipse. If using IntelliJ, copy spring-intellij-code-style.xml to ~/.IntelliJIdea*/config/codestyles and select spring-intellij-code-style from Settings -> Code Styles.
  • Make sure all new .java files have a simple Javadoc class comment with at least an @author tag identifying you, and preferably at least a paragraph on what the class is for.
  • Add the ASF license header comment to all new .java files (copy from existing files in the project)
  • Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).
  • Add some Javadocs and, if you change the namespace, some XSD doc elements.
  • A few unit tests would help a lot as well - someone has to do it.
  • If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).
org.springframework.security

Spring

Versions

Version
1.1.1.RELEASE
1.1.0.RELEASE
1.0.11.RELEASE
1.0.10.RELEASE
1.0.9.RELEASE
1.0.8.RELEASE
1.0.7.RELEASE
1.0.6.RELEASE
1.0.5.RELEASE
1.0.4.RELEASE
1.0.3.RELEASE
1.0.2.RELEASE
1.0.1.RELEASE
1.0.0.RELEASE