Liking cljdoc? Tell your friends :D

monkey.ci.web.auth

Authentication and authorization functions

Authentication and authorization functions
raw docstring

augment-payloadclj

(augment-payload payload)
source

build-tokenclj

Creates token contents for a build, to be used by a build script.

Creates token contents for a build, to be used by a build script.
sourceraw docstring

config->keypairclj

(config->keypair conf)

Loads private and public keys from the app config, returns a map that can be used in the context :jwk.

Loads private and public keys from the app config, returns a map that can be
used in the context `:jwk`.
sourceraw docstring

customer-authorizationclj

(customer-authorization h)

Middleware that verifies the identity token to check if the user or build has access to the given customer.

Middleware that verifies the identity token to check if the user or build has
access to the given customer.
sourceraw docstring

default-token-expirationclj

source

expired?clj

(expired? {:keys [exp]})

Returns true if token has expired

Returns true if token has expired
sourceraw docstring

generate-jwtclj

(generate-jwt req payload)

Signs a JWT using the keypair from the request context.

Signs a JWT using the keypair from the request context.
sourceraw docstring

generate-jwt-from-rtclj

(generate-jwt-from-rt rt payload)

Generates a JWT from the private key in the runtime

Generates a JWT from the private key in the runtime
sourceraw docstring

generate-keypairclj

(generate-keypair)

Generates a new RSA keypair

Generates a new RSA keypair
sourceraw docstring

generate-secret-keyclj

(generate-secret-key)

Generates a random secret key object

Generates a random secret key object
sourceraw docstring

jwksclj

(jwks req)

JWKS endpoint handler

JWKS endpoint handler
sourceraw docstring

keypair->rtclj

(keypair->rt kp)
source

kidclj

source

make-jwkclj

(make-jwk pub)

Creates a JWK object from a public key that can be exposed for external verification.

Creates a JWK object from a public key that can be exposed for external 
verification.
sourceraw docstring

parse-signatureclj

(parse-signature s)

Parses HMAC signature header, returns the algorithm and the signature.

Parses HMAC signature header, returns the algorithm and the signature.
sourceraw docstring

req->webhook-idclj

source

resolve-tokencljmultimethod

source

role-buildclj

source

role-userclj

source

rt->pub-keyclj

source

secure-ring-appclj

(secure-ring-app app rt)

Wraps the ring handler so it verifies the JWT authorization header

Wraps the ring handler so it verifies the JWT authorization header
sourceraw docstring

sign-jwtclj

(sign-jwt payload pk)
source

user-idclj

Retrieves current user id from request

Retrieves current user id from request
sourceraw docstring

user-tokenclj

Creates token contents for an authenticated user

Creates token contents for an authenticated user
sourceraw docstring

valid-security?clj

(valid-security? {:keys [secret payload x-hub-signature]})

Validates security header

Validates security header
sourceraw docstring

validate-hmac-securityclj

(validate-hmac-security h
                        {:keys [get-secret header]
                         :or {header "x-hub-signature-256"}})

Middleware that validates the HMAC security header using a fn that retrieves the secret for the request.

Middleware that validates the HMAC security header using a fn that retrieves
the secret for the request.
sourceraw docstring

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

× close