;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312%\207" [require eieio gh-profile gh-common gh-url custom-declare-group gh-auth nil "Github authentication." :group gh] 6) (defvar gh-auth-alist nil) (defalias 'gh-auth-remember #[(profile key value) "\305 \"\211\204C\306 \nC\"\n\307\nA \f#\241)\207" [profile gh-auth-alist cell key value assoc append plist-put] 6]) (defalias 'gh-auth-get-username #[nil "\304 \305\306 \"A\307\"\206\305\306\n\"A\307\"\206\310\311!\211\204*\312\313!\314\311 \"\210\315\307 #\210 *\207" [profile gh-auth-alist gh-profile-alist user gh-profile-current-profile plist-get assoc :username gh-config "user" read-string "GitHub username: " gh-set-config gh-auth-remember] 5]) (defalias 'gh-auth-get-password #[(&optional remember) "\305 \306\307 \"A\310\"\206\306\307\n\"A\310\"\206\311\312!\211\204.\313\314!\f\203.\315\312 \"\210\f\2038\316\310 #\210 *\207" [profile gh-auth-alist gh-profile-alist pass remember gh-profile-current-profile plist-get assoc :password gh-config "password" read-passwd "GitHub password: " gh-set-config gh-auth-remember] 5]) (defalias 'gh-auth-get-oauth-token #[nil "\306 \307\310 \"A\311\"\206\307\310\n\"A\311\"\206\312\313!\211\204D\314\315!\316\317!\2055\320\211\317\f\321\"\322\"\311\"\211\206=\323\324!\325\313 \"\210*\326\311 #\210 *\207" [profile gh-auth-alist gh-profile-alist token api tok gh-profile-current-profile plist-get assoc :token gh-config "oauth-token" make-instance gh-oauth-api fboundp gh-oauth-auth-new eieio-oref (user repo gist) :data read-string "GitHub OAuth token: " gh-set-config gh-auth-remember] 6]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias gh-authenticator-p eieio-make-class-predicate gh-authenticator gh-authenticator--eieio-childp eieio-make-child-predicate gh-authenticator-child-p make-obsolete "use (cl-typep ... \\='gh-authenticator) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal nil ((username :initarg :username :initform nil)) (:documentation "Abstract authenticator")] 6) #@55 Create a new object of class type `gh-authenticator'. (defalias 'gh-authenticator #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-authenticator] 4 (#$ . 2288)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-authenticator compiler-macro gh-authenticator--anon-cmacro] 4) (defalias 'gh-authenticator--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\300\307\302\307\303\"\"\210\304\307\303\305\310$\210\311\312\313\314!\"\210\311\315\316\314!\"\210\311\317\315\"\210\320\317\321\322#\210\323\314\324\315#\325\314\326\327\330$\207" [eieio--defalias initialize-instance eieio--defgeneric-init-form nil eieio--defmethod gh-authenticator #[(auth &rest args) "\301 \210\302\303\"\206\304\303\305 #\207" [auth call-next-method eieio-oref :username eieio-oset gh-auth-get-username] 4] gh-auth-modify-request #[(auth req) "\207" [req] 1] defalias gh-auth-2fa-callback-p eieio-make-class-predicate gh-auth-2fa-callback gh-auth-2fa-callback--eieio-childp eieio-make-child-predicate gh-auth-2fa-callback-child-p make-obsolete "use (cl-typep ... \\='gh-auth-2fa-callback) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-url-callback) ((req :initarg :req :initform nil)) (:documentation "2-factor callback")] 6) #@59 Create a new object of class type `gh-auth-2fa-callback'. (defalias 'gh-auth-2fa-callback #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-auth-2fa-callback] 4 (#$ . 3765)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-auth-2fa-callback compiler-macro gh-auth-2fa-callback--anon-cmacro] 4) (defalias 'gh-auth-2fa-callback--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\307\310\311\312!\"\210\307\313\314\312!\"\210\307\315\313\"\210\316\315\317\320#\210\321\312\322\313#\323\312\324\325\326$\207" [eieio--defalias gh-url-callback-run eieio--defgeneric-init-form nil eieio--defmethod gh-auth-2fa-callback #[(cb resp) "\306\307\"\310=\205B\311\312 \306\313\"\"\211\205A\314\315\nA\"\205A\316\317!\306 \320\"\321\322\323#\210\321\324\323#\210\325\f\313 B#\210\326\f\"**\207" [resp otp-header h cb req otp eieio-oref :http-status 401 "X-GitHub-OTP" assoc :headers string-prefix-p "required;" read-from-minibuffer "Enter dual-factor auth code: " :req eieio-oset :data nil :data-received object-add-to-list gh-url-run-request] 6] defalias gh-password-authenticator-p eieio-make-class-predicate gh-password-authenticator gh-password-authenticator--eieio-childp eieio-make-child-predicate gh-password-authenticator-child-p make-obsolete "use (cl-typep ... \\='gh-password-authenticator) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-authenticator) ((password :initarg :password :protection :private :initform nil) (remember :allocation :class :initform t) (2fa-cls :initform gh-auth-2fa-callback :allocation :class)) (:documentation "Password-based authenticator")] 6) #@64 Create a new object of class type `gh-password-authenticator'. (defalias 'gh-password-authenticator #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-password-authenticator] 4 (#$ . 5619)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-password-authenticator compiler-macro gh-password-authenticator--anon-cmacro] 4) (defalias 'gh-password-authenticator--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\300\307\302\307\303\"\"\210\304\307\303\305\310$\210\311\312\313\314!\"\210\311\315\316\314!\"\210\311\317\315\"\210\320\317\321\322#\210\323\314\324\315#\325\314\326\327\330$\207" [eieio--defalias initialize-instance eieio--defgeneric-init-form nil eieio--defmethod gh-password-authenticator #[(auth &rest args) "\301 \210\302\303\"\206\304\303\305\302\306\"!#\207" [auth call-next-method eieio-oref :password eieio-oset gh-auth-get-password remember] 7] gh-auth-modify-request #[(auth req) "\302\303\304\305\306\307\310\311 \312\"\313\311 \314\"\315\"#!PB#\210\302\316\317\311 \320\"\321##\210\207" [req auth object-add-to-list :headers "Authorization" "Basic " base64-encode-string format "%s:%s" eieio-oref :username encode-coding-string :password utf-8 :install-callbacks make-instance 2fa-cls :req] 13] defalias gh-oauth-authenticator-p eieio-make-class-predicate gh-oauth-authenticator gh-oauth-authenticator--eieio-childp eieio-make-child-predicate gh-oauth-authenticator-child-p make-obsolete "use (cl-typep ... \\='gh-oauth-authenticator) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-authenticator) ((token :initarg :token :protection :private :initform nil)) (:documentation "Oauth-based authenticator")] 6) #@61 Create a new object of class type `gh-oauth-authenticator'. (defalias 'gh-oauth-authenticator #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-oauth-authenticator] 4 (#$ . 7527)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-oauth-authenticator compiler-macro gh-oauth-authenticator--anon-cmacro] 4) (defalias 'gh-oauth-authenticator--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\300\307\302\307\303\"\"\210\304\307\303\305\310$\210\311\312!\210\313\314!\207" [eieio--defalias initialize-instance eieio--defgeneric-init-form nil eieio--defmethod gh-oauth-authenticator #[(auth &rest args) "\301 \210\302\303\"\206\304\303\305 #\207" [auth call-next-method eieio-oref :token eieio-oset gh-auth-get-oauth-token] 4] gh-auth-modify-request #[(auth req) "\302\303\304\305\306\307\310 \311\"\"\312\"B#\210\207" [req auth object-add-to-list :headers "Authorization" encode-coding-string format "token %s" eieio-oref :token utf-8] 10] provide gh-auth require gh-oauth] 5)