The jose Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The jose Reference Manual

This is the jose Reference Manual, version 0.1.0, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:52:10 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

jose

Quicklisp dist Build Status Coverage Status

A JSON Object Signing and Encryption (JOSE) implementation for Common Lisp.

Usage

(defvar *key* (ironclad:ascii-string-to-byte-array "my$ecret"))

(defvar *token*
  (jose:encode :hs256 *key* '(("hello" . "world"))))

*token*
;=> "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJoZWxsbyI6IndvcmxkIn0.Vr0VKL9WHX9lUPWzrE0DX4fEvl0_CgnKlzI2mWiro8E"

(jose:decode :hs256 *key* *token*)
;=> (("hello" . "world"))
;   (("alg" . "HS256") ("typ" . "JWT"))

;; Decoding without signature verification.
(jose:inspect-token *token*)
;=> (("hello" . "world"))
;   (("alg" . "HS256") ("typ" . "JWT"))
;   #(142 123 175 222 84 4 134 19 70 182 50 209 29 113 176 40 82 42 241 90 230 91
;     176 235 254 57 221 93 97 220 6 101)

Supported Algorithms

See Also

Author

Copyright

Copyright (c) 2017 Eitaro Fukamachi (e.arrows@gmail.com)

License

Licensed under the BSD 2-Clause License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Next: , Previous: , Up: Systems   [Contents][Index]

2.1 jose

Author

Eitaro Fukamachi

License

BSD 2-Clause

Description

JSON Object Signing and Encryption (JOSE) implementation

Version

0.1.0

Dependency

jose/main (system)

Source

jose.asd (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.2 jose/main

Dependencies
Component

lisp.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.3 jose/jwt

Dependencies
Component

lisp.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.4 jose/jws

Dependencies
Component

lisp.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.5 jose/base64

Dependency

cl-base64

Component

lisp.lisp (file)


Previous: , Up: Systems   [Contents][Index]

2.6 jose/errors

Component

lisp.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 jose.asd

Location

jose.asd

Systems

jose (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 jose/main/lisp.lisp

Parent

jose/main (system)

Location

main.lisp

Packages

jose


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 jose/jwt/lisp.lisp

Parent

jose/jwt (system)

Location

jwt.lisp

Packages

jose/jwt

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 jose/jws/lisp.lisp

Parent

jose/jws (system)

Location

jws.lisp

Packages

jose/jws

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 jose/base64/lisp.lisp

Parent

jose/base64 (system)

Location

base64.lisp

Packages

jose/base64

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.6 jose/errors/lisp.lisp

Parent

jose/errors (system)

Location

errors.lisp

Packages

jose/errors

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 jose

Source

lisp.lisp (file)

Nickname

jose/main

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

4.2 jose/jwt

Source

lisp.lisp (file)

Use List
Used By List

jose

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.3 jose/jws

Source

lisp.lisp (file)

Use List
Used By List

jose

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.4 jose/base64

Source

lisp.lisp (file)

Use List

common-lisp

Used By List

jose/jws

Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.5 jose/errors

Source

lisp.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: base64url-decode INPUT &key AS
Package

jose/base64

Source

lisp.lisp (file)

Function: base64url-encode INPUT
Package

jose/base64

Source

lisp.lisp (file)

Function: decode ALGORITHM KEY TOKEN &key ISSUER AUDIENCE SUBJECT
Package

jose/jwt

Source

lisp.lisp (file)

Function: decode-token TOKEN
Package

jose/jws

Source

lisp.lisp (file)

Function: encode ALGORITHM KEY CLAIMS &key HEADERS
Package

jose/jwt

Source

lisp.lisp (file)

Function: inspect-token TOKEN

Decodes the TOKEN without signature verification.

Package

jose/jwt

Source

lisp.lisp (file)

Function: sign ALGORITHM KEY PAYLOAD &key HEADERS
Package

jose/jws

Source

lisp.lisp (file)

Function: verify ALGORITHM KEY TOKEN
Package

jose/jws

Source

lisp.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Conditions

Condition: jose-error ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Condition: jws-error ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

jose-error (condition)

Direct subclasses
Condition: jws-invalid-format ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

jws-error (condition)

Direct slots
Slot: token
Initargs

:token

Condition: jws-verification-error ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

jws-error (condition)

Direct slots
Slot: token
Initargs

:token

Condition: jwt-claims-error ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

jwt-error (condition)

Direct subclasses
Direct slots
Slot: key
Initargs

:key

Slot: value
Initargs

:value

Condition: jwt-claims-expired ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

jwt-claims-error (condition)

Condition: jwt-claims-not-yet-valid ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

jwt-claims-error (condition)

Condition: jwt-error ()
Package

jose/errors

Source

lisp.lisp (file)

Direct superclasses

jose-error (condition)

Direct subclasses

jwt-claims-error (condition)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: %verify-message ALGORITHM KEY MESSAGE SIGNATURE &key START END
Package

jose/jws

Source

lisp.lisp (file)

Function: add-padding INPUT
Package

jose/base64

Source

lisp.lisp (file)

Function: check-alg HEADERS ALGORITHM
Package

jose/jws

Source

lisp.lisp (file)

Function: check-aud CLAIMS AUDIENCE
Package

jose/jwt

Source

lisp.lisp (file)

Function: check-claims CLAIMS &key ISSUER AUDIENCE SUBJECT
Package

jose/jwt

Source

lisp.lisp (file)

Function: check-exp CLAIMS
Package

jose/jwt

Source

lisp.lisp (file)

Function: check-iat CLAIMS
Package

jose/jwt

Source

lisp.lisp (file)

Function: check-iss CLAIMS ISSUER
Package

jose/jwt

Source

lisp.lisp (file)

Function: check-jti CLAIMS
Package

jose/jwt

Source

lisp.lisp (file)

Function: check-nbf CLAIMS
Package

jose/jwt

Source

lisp.lisp (file)

Function: check-sub CLAIMS SUBJECT
Package

jose/jwt

Source

lisp.lisp (file)

Function: encode-headers ALGORITHM ADDITIONAL-HEADERS
Package

jose/jws

Source

lisp.lisp (file)

Function: get-signature ALGORITHM KEY MESSAGE &key START END
Package

jose/jws

Source

lisp.lisp (file)

Function: hmac-sign-message DIGEST-SPEC SECRET-KEY MESSAGE &key START END
Package

jose/jws

Source

lisp.lisp (file)

Function: hmac-verify-signature DIGEST-SPEC VERIFICATION-KEY MESSAGE SIGNATURE &key START END
Package

jose/jws

Source

lisp.lisp (file)

Function: now ()
Package

jose/jwt

Source

lisp.lisp (file)

Function: rsa-sign-message DIGEST-SPEC PRIVATE-KEY MESSAGE &key START END PSS
Package

jose/jws

Source

lisp.lisp (file)

Function: rsa-verify-signature DIGEST-SPEC PUBLIC-KEY MESSAGE SIGNATURE &key START END PSS
Package

jose/jws

Source

lisp.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Types

Type: octets &optional LEN
Package

jose/base64

Source

lisp.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   J   L  
Index Entry  Section

F
File, Lisp, jose.asd: The jose<dot>asd file
File, Lisp, jose/base64/lisp.lisp: The jose/base64/lisp<dot>lisp file
File, Lisp, jose/errors/lisp.lisp: The jose/errors/lisp<dot>lisp file
File, Lisp, jose/jws/lisp.lisp: The jose/jws/lisp<dot>lisp file
File, Lisp, jose/jwt/lisp.lisp: The jose/jwt/lisp<dot>lisp file
File, Lisp, jose/main/lisp.lisp: The jose/main/lisp<dot>lisp file

J
jose.asd: The jose<dot>asd file
jose/base64/lisp.lisp: The jose/base64/lisp<dot>lisp file
jose/errors/lisp.lisp: The jose/errors/lisp<dot>lisp file
jose/jws/lisp.lisp: The jose/jws/lisp<dot>lisp file
jose/jwt/lisp.lisp: The jose/jwt/lisp<dot>lisp file
jose/main/lisp.lisp: The jose/main/lisp<dot>lisp file

L
Lisp File, jose.asd: The jose<dot>asd file
Lisp File, jose/base64/lisp.lisp: The jose/base64/lisp<dot>lisp file
Lisp File, jose/errors/lisp.lisp: The jose/errors/lisp<dot>lisp file
Lisp File, jose/jws/lisp.lisp: The jose/jws/lisp<dot>lisp file
Lisp File, jose/jwt/lisp.lisp: The jose/jwt/lisp<dot>lisp file
Lisp File, jose/main/lisp.lisp: The jose/main/lisp<dot>lisp file

Jump to:   F   J   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %  
A   B   C   D   E   F   G   H   I   N   R   S   V  
Index Entry  Section

%
%verify-message: Internal functions

A
add-padding: Internal functions

B
base64url-decode: Exported functions
base64url-encode: Exported functions

C
check-alg: Internal functions
check-aud: Internal functions
check-claims: Internal functions
check-exp: Internal functions
check-iat: Internal functions
check-iss: Internal functions
check-jti: Internal functions
check-nbf: Internal functions
check-sub: Internal functions

D
decode: Exported functions
decode-token: Exported functions

E
encode: Exported functions
encode-headers: Internal functions

F
Function, %verify-message: Internal functions
Function, add-padding: Internal functions
Function, base64url-decode: Exported functions
Function, base64url-encode: Exported functions
Function, check-alg: Internal functions
Function, check-aud: Internal functions
Function, check-claims: Internal functions
Function, check-exp: Internal functions
Function, check-iat: Internal functions
Function, check-iss: Internal functions
Function, check-jti: Internal functions
Function, check-nbf: Internal functions
Function, check-sub: Internal functions
Function, decode: Exported functions
Function, decode-token: Exported functions
Function, encode: Exported functions
Function, encode-headers: Internal functions
Function, get-signature: Internal functions
Function, hmac-sign-message: Internal functions
Function, hmac-verify-signature: Internal functions
Function, inspect-token: Exported functions
Function, now: Internal functions
Function, rsa-sign-message: Internal functions
Function, rsa-verify-signature: Internal functions
Function, sign: Exported functions
Function, verify: Exported functions

G
get-signature: Internal functions

H
hmac-sign-message: Internal functions
hmac-verify-signature: Internal functions

I
inspect-token: Exported functions

N
now: Internal functions

R
rsa-sign-message: Internal functions
rsa-verify-signature: Internal functions

S
sign: Exported functions

V
verify: Exported functions

Jump to:   %  
A   B   C   D   E   F   G   H   I   N   R   S   V  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   K   S   T   V  
Index Entry  Section

K
key: Exported conditions

S
Slot, key: Exported conditions
Slot, token: Exported conditions
Slot, token: Exported conditions
Slot, value: Exported conditions

T
token: Exported conditions
token: Exported conditions

V
value: Exported conditions

Jump to:   K   S   T   V  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   J   O   P   S   T  
Index Entry  Section

C
Condition, jose-error: Exported conditions
Condition, jws-error: Exported conditions
Condition, jws-invalid-format: Exported conditions
Condition, jws-verification-error: Exported conditions
Condition, jwt-claims-error: Exported conditions
Condition, jwt-claims-expired: Exported conditions
Condition, jwt-claims-not-yet-valid: Exported conditions
Condition, jwt-error: Exported conditions

J
jose: The jose system
jose: The jose package
jose-error: Exported conditions
jose/base64: The jose/base64 system
jose/base64: The jose/base64 package
jose/errors: The jose/errors system
jose/errors: The jose/errors package
jose/jws: The jose/jws system
jose/jws: The jose/jws package
jose/jwt: The jose/jwt system
jose/jwt: The jose/jwt package
jose/main: The jose/main system
jws-error: Exported conditions
jws-invalid-format: Exported conditions
jws-verification-error: Exported conditions
jwt-claims-error: Exported conditions
jwt-claims-expired: Exported conditions
jwt-claims-not-yet-valid: Exported conditions
jwt-error: Exported conditions

O
octets: Internal types

P
Package, jose: The jose package
Package, jose/base64: The jose/base64 package
Package, jose/errors: The jose/errors package
Package, jose/jws: The jose/jws package
Package, jose/jwt: The jose/jwt package

S
System, jose: The jose system
System, jose/base64: The jose/base64 system
System, jose/errors: The jose/errors system
System, jose/jws: The jose/jws system
System, jose/jwt: The jose/jwt system
System, jose/main: The jose/main system

T
Type, octets: Internal types

Jump to:   C   J   O   P   S   T