changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/cry/authinfo.lisp

changeset 698: 96958d3eb5b0
parent: 7120877e0453
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 ;;; authinfo.lisp --- Gnus Authinfo
2 
3 ;;
4 
5 ;;; Commentary:
6 
7 ;; ref: https://www.emacswiki.org/emacs/GnusAuthinfo
8 
9 ;;; Code:
10 (in-package :cry/authinfo)
11 
12 (defvar *auth-sources* (list #p"~/.authinfo" #p"~/.authinfo.gpg"))
13 
14 ;;; Utils
15 (defun write-authinfo-line (cons stream)
16  (write-string (car cons) stream)
17  (write-char #\space stream)
18  (write-line (cdr cons) stream))
19 
20 (defun read-authinfo-line (stream)
21  (let ((line (read-line stream nil nil)))
22  line))
23 
24 ;;; Obj
25 (defclass authinfo ()
26  ((path :type pathname :initarg :path :accessor authinfo-path)
27  (credentials :type list :initarg :credentials :accessor authinfo-credentials)))
28 
29 ;; TODO 2024-06-30:
30 (defmethod dat/proto:serde ((from authinfo) (to pathname)))
31 (defmethod dat/proto:serde ((from stream) (to authinfo)))
32 
33 (defmethod dat/proto:deserialize ((from pathname) (format (eql :authinfo)) &key))