Liking cljdoc? Tell your friends :D

buddy.auth.protocols

Main authentication and authorization abstractions defined as protocols.

Main authentication and authorization abstractions
defined as protocols.
raw docstring

IAuthenticationcljprotocol

Protocol that defines unified workflow steps for all authentication backends.

Protocol that defines unified workflow steps for
all authentication backends.

-authenticateclj

(-authenticate _ request data)

Given a request and parsed data (from previous step), try to authenticate this data.

If this method returns not nil value, the request will be considered authenticated and the value will be attached to request under :identity attribute.

Given a request and parsed data (from previous step),
try to authenticate this data.

If this method returns not nil value, the request
will be considered authenticated and the value will
be attached to request under `:identity` attribute.

-parseclj

(-parse _ request)

Parse token from the request. If it returns nil the authenticate phase will be skipped and the handler will be called directly.

Parse token from the request. If it returns `nil`
the `authenticate` phase will be skipped and the
handler will be called directly.
sourceraw docstring

IAuthorizationcljprotocol

Protocol that defines unified workflow steps for authorization exceptions.

Protocol that defines unified workflow steps for
authorization exceptions.

-handle-unauthorizedclj

(-handle-unauthorized _ request metadata)

This function is executed when a NotAuthorizedException exception is intercepted by authorization wrapper.

It should return a valid ring response.

This function is executed when a `NotAuthorizedException`
exception is intercepted by authorization wrapper.

It should return a valid ring response.
sourceraw docstring

IAuthorizationdErrorcljprotocol

Abstraction that allows the user to extend the exception based authorization system with own types.

Abstraction that allows the user to extend the exception
based authorization system with own types.

-get-error-dataclj

(-get-error-data _)

Get error information.

Get error information.
sourceraw docstring

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

× close