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.

IAuthenticationprotocol

Protocol that defines unified workflow steps for all authentication backends.

Protocol that defines unified workflow steps for
all authentication backends.
-authenticate
(-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.

-parse
(-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

IAuthorizationprotocol

Protocol that defines unified workflow steps for authorization exceptions.

Protocol that defines unified workflow steps for
authorization exceptions.
-handle-unauthorized
(-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

IAuthorizationdErrorprotocol

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-data
(-get-error-data _)

Get error information.

Get error information.

sourceraw docstring

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

× close