(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.
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.
(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.
(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.
(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.
(expired? jwt-claims)
Return true/false if the JWToken is expired.
Return true/false if the JWToken is expired.
(generate payload passphrase)
Create a JSON Web Token from a payload.
Create a JSON Web Token from a payload.
(-sign this payload)
Generate JWT for given payload
Generate JWT for given payload
(-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
Make a single name
field from first-name
and/or last-name
.
Make a single `name` field from `first-name` and/or `last-name`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close