.TH "ttypt/auth.h" 3 "axil-auth" \" -*- nroff -*- .ad l .nh .SH NAME ttypt/auth.h \- Sessions, registration, ownership, and POSIX user/group operations for axil\&. .SH SYNOPSIS .br .PP \fR#include \fP .br \fR#include \fP .br .SS "Functions" .in +1c .ti -1c .RI "\fBXY_DECL\fP (int, get_cookie, const char *, cookie, char *, token, size_t, len)" .br .RI "Extract and validate a session token from a raw cookie value\&. " .ti -1c .RI "\fBXY_DECL\fP (const char *, get_session_user, const char *, token)" .br .RI "Resolve the username owning a session token\&. " .ti -1c .RI "\fBXY_DECL\fP (const char *, get_request_user, int, fd)" .br .RI "Resolve the username of the session on a client fd\&. " .ti -1c .RI "\fBXY_DECL\fP (int, auth_password_matches, const char *, username, const char *, password)" .br .RI "Check a username/password pair against the stored credential\&. " .ti -1c .RI "\fBXY_DECL\fP (int, require_login, int, fd, const char *, username)" .br .RI "Require a login, emitting the login challenge when absent\&. " .ti -1c .RI "\fBXY_DECL\fP (int, auth_get_tty_ticket, int, fd, char *, out, size_t, len)" .br .RI "Retrieve the signed TTY ticket for the authenticated user on fd\&. " .in -1c .SH "Detailed Description" .PP Sessions, registration, ownership, and POSIX user/group operations for axil\&. Caller-facing XY hook declarations\&. Implementers must NOT include this header\&. Direct configuration lives in \fBauth-config\&.h\fP and internal outcome dispatches live in \fBauth-outcome\&.h\fP\&. .SH "Function Documentation" .PP .SS "XY_DECL (int , auth_get_tty_ticket , int , fd , char * , out , size_t , len )" .PP Retrieve the signed TTY ticket for the authenticated user on fd\&. Non-zero (1) on success (writes NUL-terminated ticket into out), 0 on failure or absent module\&. .SS "XY_DECL (int , auth_password_matches , const char * , username , const char * , password )" .PP Check a username/password pair against the stored credential\&. Non-zero on success, 0 on failure or absent module\&. .SH "Author" .PP Generated automatically by Doxygen for axil-auth from the source code\&.