Skip to content

Commit 1395fbd

Browse files
committed
First commit.
0 parents  commit 1395fbd

File tree

6 files changed

+570
-0
lines changed

6 files changed

+570
-0
lines changed

.gitignore

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
node_modules
2+
3+
# Ignore Java and IntelliJ IDEA stuff
4+
.idea
5+
target
6+
*.iml
7+
8+
## Ignore Visual Studio temporary files, build results, and
9+
## files generated by popular Visual Studio add-ons.
10+
11+
packages
12+
13+
# User-specific files
14+
*.suo
15+
*.user
16+
*.sln.docstates
17+
18+
# Build results
19+
20+
[Dd]ebug/
21+
[Rr]elease/
22+
x64/
23+
build/
24+
[Bb]in/
25+
[Oo]bj/
26+
27+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
28+
!packages/*/build/
29+
30+
# MSTest test Results
31+
[Tt]est[Rr]esult*/
32+
[Bb]uild[Ll]og.*
33+
34+
*_i.c
35+
*_p.c
36+
*.ilk
37+
*.meta
38+
*.obj
39+
*.pch
40+
*.pdb
41+
*.pgc
42+
*.pgd
43+
*.rsp
44+
*.sbr
45+
*.tlb
46+
*.tli
47+
*.tlh
48+
*.tmp
49+
*.tmp_proj
50+
*.log
51+
*.vspscc
52+
*.vssscc
53+
.builds
54+
*.pidb
55+
*.log
56+
*.scc
57+
58+
# Visual C++ cache files
59+
ipch/
60+
*.aps
61+
*.ncb
62+
*.opensdf
63+
*.sdf
64+
*.cachefile
65+
66+
# Visual Studio profiler
67+
*.psess
68+
*.vsp
69+
*.vspx
70+
71+
# Guidance Automation Toolkit
72+
*.gpState
73+
74+
# ReSharper is a .NET coding add-in
75+
_ReSharper*/
76+
*.[Rr]e[Ss]harper
77+
78+
# TeamCity is a build add-in
79+
_TeamCity*
80+
81+
# DotCover is a Code Coverage Tool
82+
*.dotCover
83+
84+
# NCrunch
85+
*.ncrunch*
86+
.*crunch*.local.xml
87+
88+
# Installshield output folder
89+
[Ee]xpress/
90+
91+
# DocProject is a documentation generator add-in
92+
DocProject/buildhelp/
93+
DocProject/Help/*.HxT
94+
DocProject/Help/*.HxC
95+
DocProject/Help/*.hhc
96+
DocProject/Help/*.hhk
97+
DocProject/Help/*.hhp
98+
DocProject/Help/Html2
99+
DocProject/Help/html
100+
101+
# Click-Once directory
102+
publish/
103+
104+
# Publish Web Output
105+
*.Publish.xml
106+
107+
# NuGet Packages Directory
108+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
109+
#packages/
110+
111+
# Windows Azure Build Output
112+
csx
113+
*.build.csdef
114+
115+
# Windows Store app package directory
116+
AppPackages/
117+
118+
# Others
119+
sql/
120+
*.Cache
121+
ClientBin/
122+
[Ss]tyle[Cc]op.*
123+
~$*
124+
*~
125+
*.dbmdl
126+
*.[Pp]ublish.xml
127+
*.pfx
128+
*.publishsettings
129+
130+
# RIA/Silverlight projects
131+
Generated_Code/
132+
133+
# Backup & report files from converting an old project file to a newer
134+
# Visual Studio version. Backup files are not needed, because we have git ;-)
135+
_UpgradeReport_Files/
136+
Backup*/
137+
UpgradeLog*.XML
138+
UpgradeLog*.htm
139+
140+
# SQL Server files
141+
App_Data/*.mdf
142+
App_Data/*.ldf
143+
144+
145+
#LightSwitch generated files
146+
GeneratedArtifacts/
147+
_Pvt_Extensions/
148+
ModelManifest.xml
149+
150+
# =========================
151+
# Windows detritus
152+
# =========================
153+
154+
# Windows image file caches
155+
Thumbs.db
156+
ehthumbs.db
157+
158+
# Folder config file
159+
Desktop.ini
160+
161+
# Recycle Bin used on file shares
162+
$RECYCLE.BIN/
163+
164+
# Mac desktop service store files
165+
.DS_Store

LICENSE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013 AUTH10 LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Java JWT
2+
3+
An implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html).
4+
5+
This was developed against draft-ietf-oauth-json-web-token-08
6+
7+
### Usage
8+
9+
```java
10+
public class Application {
11+
public static void main (String [] args) {
12+
Map<String,String> decodedPayload = new JWTVerifier("secret", "audience").verify("my-token");
13+
14+
// Get custom fields from decoded Payload
15+
System.out.println(decodedPayload.get("name"));
16+
}
17+
}
18+
``
19+
20+
### FAQ
21+
22+
23+
#### Why another JSON Web Token implementation for Java?
24+
We think that current JWT implementations are either too complex or not enough tested. We want something simple with the right number of abstractions.
25+
26+
## License
27+
28+
The MIT License (MIT)
29+
30+
Copyright (c) 2013 AUTH10 LLC
31+
32+
Permission is hereby granted, free of charge, to any person obtaining a copy
33+
of this software and associated documentation files (the "Software"), to deal
34+
in the Software without restriction, including without limitation the rights
35+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36+
copies of the Software, and to permit persons to whom the Software is
37+
furnished to do so, subject to the following conditions:
38+
39+
The above copyright notice and this permission notice shall be included in
40+
all copies or substantial portions of the Software.
41+
42+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
48+
THE SOFTWARE.

pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.auth0</groupId>
8+
<artifactId>java-jwt</artifactId>
9+
<version>0.1-SNAPSHOT</version>
10+
11+
<dependencies>
12+
<!-- For JWT parsing-->
13+
<dependency>
14+
<groupId>com.fasterxml.jackson.core</groupId>
15+
<artifactId>jackson-databind</artifactId>
16+
<version>2.0.0</version>
17+
</dependency>
18+
<dependency>
19+
<groupId>commons-codec</groupId>
20+
<artifactId>commons-codec</artifactId>
21+
<version>1.4</version>
22+
</dependency>
23+
24+
<dependency>
25+
<groupId>junit</groupId>
26+
<artifactId>junit</artifactId>
27+
<version>4.11</version>
28+
<scope>test</scope>
29+
</dependency>
30+
</dependencies>
31+
32+
33+
</project>

0 commit comments

Comments
 (0)