Common Lisp Package: CLACK.MIDDLEWARE.AUTH.BASIC

# Clack.Middleware.Auth.Basic - Basic Authentication Middleware. ## SYNOPSIS (clackup (builder (<clack-middleware-auth-basic> :authenticator #'(lambda (user pass) (and (string= user "hoge") (string= pass "fuga")))) app)) ## DESCRIPTION Clack.Middleware.Auth.Basic allows to basic authenticate simply. All you have to do is pass a function to authenticate to `<clack-middleware-auth-basic>`, `:authenticator`. (make-instance '<clack-middleware-auth-basic> :authenticator #'(lambda (user pass) ;; Authenticate here and return t or nil. )) ## AUTHOR * Eitarow Fukamachi (e.arrows@gmail.com)

README:

FUNCTION

Private

BASE64-STRING-TO-STRING (INPUT &KEY (URI NIL))

Decode base64 string to string

SCAN-TO-STRINGS (REGEX TARGET-STRING &KEY (START 0) (END (LENGTH TARGET-STRING)) SHAREDP)

Like SCAN but returns substrings of TARGET-STRING instead of positions, i.e. this function returns two values on success: the whole match as a string plus an array of substrings (or NILs) corresponding to the matched registers. If SHAREDP is true, the substrings may share structure with TARGET-STRING.

Undocumented

PARSE-USER-AND-PASS (AUTH)

MACRO

Private

Undocumented

AAND (&REST FORMS)

GENERIC-FUNCTION

Private

Undocumented

UNAUTHORIZED (THIS)

SLOT-ACCESSOR

Private

Undocumented

AUTHENTICATOR (OBJECT)

SETFAUTHENTICATOR (NEW-VALUE OBJECT)

REALM (OBJECT)

SETFREALM (NEW-VALUE OBJECT)

CLASS

Public

<CLACK-MIDDLEWARE-AUTH-BASIC>

Clack Middleware to authenticate.