Liking cljdoc? Tell your friends :D

oc.lib.jwt


admin-ofclj

(admin-of conn user-id)

Inputs: [conn user-id :- lib-schema/UniqueID] Returns: (schema/maybe [lib-schema/UniqueID])

Given the user-id of the user, return a sequence of team-ids for the teams the user is an admin of.

Requires a conn to the auth DB.

Inputs: [conn user-id :- lib-schema/UniqueID]
Returns: (schema/maybe [lib-schema/UniqueID])


Given the user-id of the user, return a sequence of team-ids for the teams the user is an admin of.

Requires a conn to the auth DB.
raw docstring

bots-forclj

(bots-for conn user)
(bots-for conn user :guard (fn* [p1__38814#] (empty? (:teams p1__38814#))))

Given a user, return a map of configured bots for each of the user's teams, keyed by team-id.

Requires a conn to the auth DB.

Given a user, return a map of configured bots for each of the user's teams, keyed by team-id.

Requires a conn to the auth DB.
raw docstring

check-tokenclj

(check-token token passphrase)

Verify a JSON Web Token with the passphrase that was (presumably) used to generate it.

Verify a JSON Web Token with the passphrase that was (presumably) used to generate it.
raw docstring

creationclj

(creation payload)

Set a creation time property in the JWToken payload.

Set a creation time property in the JWToken payload.
raw docstring

creation-timeclj

(creation-time)

decodeclj

(decode token)

Decode a JSON Web Token

Decode a JSON Web Token
raw docstring

decode-id-tokenclj

(decode-id-token token passphrase)

Decode the id-token. The first version of the id-token had :team-id key instead of :teams and it was released on production for digest only. To avoid breaking those links let's move :team-id into :teams (as list) when the id-token is being decoded.

Decode the id-token.
The first version of the id-token had :team-id key instead of :teams and it was released on production for digest only.
To avoid breaking those links let's move :team-id into :teams (as list) when the id-token is being decoded.
raw docstring

encodeclj

(encode payload passphrase)

expireclj

(expire payload)

Set an expire property in the JWToken payload, longer if there's a bot, shorter if not.

Set an expire property in the JWToken payload, longer if there's a bot, shorter if not.
raw docstring

expire-timeclj

(expire-time payload)

Given a token payload return the expiring date depending on the token content.

Given a token payload return the expiring date depending on the token content.
raw docstring

generateclj

(generate payload passphrase)

Create a JSON Web Token from a payload.

Create a JSON Web Token from a payload.
raw docstring

generate-id-tokenclj

(generate-id-token claims passphrase)

ITokenSignercljprotocol

-signclj

(-sign this payload)

Generate JWT for given payload

Generate JWT for given payload

-unsignclj

(-unsign this token)

Decode a given JWT, nil if not verifiable or otherwise broken

Decode a given JWT, nil if not verifiable or otherwise broken

media-typeclj


name-forclj

(name-for user)
(name-for first last)

Fn moved to lib.user ns. Here for backwards compatability.

Fn moved to lib.user ns. Here for backwards compatability.
raw docstring

premium-teamsclj

(premium-teams conn user-id)

Inputs: [conn :- lib-schema/Conn user-id :- lib-schema/UniqueID] Returns: (schema/maybe [lib-schema/UniqueID])

Given the user-id of the user, return a sequence of team-ids for the teams the user is an admin of.

Requires a conn to the auth DB.

Inputs: [conn :- lib-schema/Conn user-id :- lib-schema/UniqueID]
Returns: (schema/maybe [lib-schema/UniqueID])


Given the user-id of the user, return a sequence of team-ids for the teams the user is an admin of.

Requires a conn to the auth DB.
raw docstring

refresh?clj

(refresh? jwt-claims :guard map?)
(refresh? jwtoken :guard string?)

Return true/false if the JWToken needs to be refreshed. Can happen when the token is actually expired or if it's an old format: see lib-schema/ValidJWTClaims and lib-schema/Claims diffs..

Return true/false if the JWToken needs to be refreshed.
Can happen when the token is actually expired or
if it's an old format: see lib-schema/ValidJWTClaims
and lib-schema/Claims diffs..
raw docstring

timed-payloadclj

(timed-payload payload)

TokenSignerclj


valid?clj

(valid? token passphrase)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close