%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/url/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/url/url-auth.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\303\304\305\"\210\303\306\307\"\207" [require url-vars url-parse autoload url-warn "url" auth-source-search "auth-source"] 3)
#@59 String to usefully prompt for a username.

(fn URL REALM)
(defalias 'url-auth-user-prompt #[514 "\300\206\301\302!\303\304 \305\306#\"\307Q\207" ["Username [for " url-truncate-url-for-viewing url-recreate-url - window-width 10 20 "]: "] 9 (#$ . 573)])
(put 'url-auth-user-prompt 'byte-optimizer 'byte-compile-inline-expand)
#@343 Where usernames and passwords are stored.

Must be a symbol pointing to another variable that will actually store
the information.  The value of this variable is an assoc list of assoc
lists.  The first assoc list is keyed by the server name.  The cdr of
this is an assoc list based on the "directory" specified by the URL we
are looking up.
(defvar url-basic-auth-storage 'url-http-real-basic-auth-storage (#$ . 908))
#@423 Get the username/password for the specified URL.
If optional argument PROMPT is non-nil, ask for the username/password
to use for the url and its descendants.  If optional third argument
OVERWRITE is non-nil, overwrite the old username/password pair if it
is found in the assoc list.  If REALM is specified, use that as the realm
instead of the filename inheritance method.

(fn URL &optional PROMPT OVERWRITE REALM ARGS)
(defalias 'url-basic-auth #[1281 ";\203\303!\202\f\304!>\204\305\306\307D\"\210\211\310H\304!>\204-\305\306\307D\"\210\311H\304!>\204@\305\306\307D\"\210\211\312H\206p\304!>\204U\305\306\307D\"\210\211\311H\205p\313\304!>\204k\305\306\307D\"\210\311H\314\"\262\304!>\204\202\305\306\307D\"\210\315H\304!>\204\225\305\306\307D\"\210\316H\304!>\204\251\305\306\307D\"\210\317H\320\321\211\211\322\323\n	#\262	\203\304\202\336\324\230\203\316\325\202\336\326\327\"\203\332\202\336\330!\262\331	\nJ\"\243\262\203\203\332\322\333#\320\"\262\202 
\203k\204k\334		\335#\2064\336\n
\337\206(\340\341!\342\343 \344\345#\"\346Q\266\202\2063\347 \"\262\334		\350#\206J\351\352\321\206I\324#\262\n	\332\322\333\n\353\354\"#\320\"\211\262BD\nJBL\210\202 \203\331\"\243\262\204\267\326\325\"\203\267\203\267\204\267@@\262\326\325\"\203\253GGY\203\260\211\355\356G#\230\203\260@A\262A\262\202\203\204\300
\204\305\f\203 \334		\335#\206\353\336\n
\337\206\344\340\341!\342\343 \344\345#\"\346Q\266\202\347 \"\262\334		\350#\206\372\351\352!\262\332\322\333#\320\"\262\331	\nJ\"\262BAB\241\210\202 \321\262\203)\357P\262)\207" [cl-struct-url-tags enable-recursive-minibuffers url-basic-auth-storage url-generic-parse-url type-of signal wrong-type-argument url 4 1 5 url-scheme-get-property default-port 6 2 3 t nil format "%s:%d" "" "/" string-match "/$" url-file-directory assoc base64-encode-string "%s:%s" url-do-auth-source-search :user read-string "Username [for " url-truncate-url-for-viewing url-recreate-url - window-width 10 20 "]: " user-real-login-name :secret read-passwd "Password: " encode-coding-string utf-8 substring 0 "Basic "] 25 (#$ . 1334)])
#@236 Where usernames and passwords are stored.
Its value is an assoc list of assoc lists.  The first assoc list is
keyed by the server name.  The cdr of this is an assoc list based
on the "directory" specified by the url we are looking up.
(defvar url-digest-auth-storage nil (#$ . 3596))
#@73 Concatenate ARGS as strings with colon as a separator.

(fn &rest ARGS)
(defalias 'url-digest-auth-colonjoin #[128 "\300\301\302#\207" [mapconcat identity ":"] 5 (#$ . 3886)])
(put 'url-digest-auth-colonjoin 'byte-optimizer 'byte-compile-inline-expand)
#@86 Apply digest algorithm to DATA using SECRET and return the result.

(fn DATA SECRET)
(defalias 'url-digest-auth-kd #[514 "\300D\301\302\303#\262!\207" [md5 mapconcat identity ":"] 8 (#$ . 4146)])
(put 'url-digest-auth-kd 'byte-optimizer 'byte-compile-inline-expand)
#@86 Compute checksum out of strings USER, REALM, and PASSWORD.

(fn USER REALM PASSWORD)
(defalias 'url-digest-auth-make-ha1 #[771 "\300E\301\302\303#\262!\207" [md5 mapconcat identity ":"] 9 (#$ . 4422)])
(put 'url-digest-auth-make-ha1 'byte-optimizer 'byte-compile-inline-expand)
#@80 Compute checksum out of strings METHOD and DIGEST-URI.

(fn METHOD DIGEST-URI)
(defalias 'url-digest-auth-make-ha2 #[514 "\300D\301\302\303#\262!\207" [md5 mapconcat identity ":"] 8 (#$ . 4711)])
(put 'url-digest-auth-make-ha2 'byte-optimizer 'byte-compile-inline-expand)
#@167 Construct the request-digest from hash strings HA1, HA2, and NONCE.
This is the value that server receives as a proof that user knows
a password.

(fn HA1 HA2 NONCE)
(defalias 'url-digest-auth-make-request-digest #[771 "\211D\300\301\302#\262\303D\300\301\302#\262!\207" [mapconcat identity ":" md5] 11 (#$ . 4994)])
(put 'url-digest-auth-make-request-digest 'byte-optimizer 'byte-compile-inline-expand)
#@344 Construct the request-digest with qop.
QOP describes the "quality of protection" and algorithm to use.
All of the strings QOP, HA1, HA2, NONCE, NC, and CNONCE are
combined into a single hash value that proves to a server the
user knows a password.  It's worth noting that HA2 already
depends on value of QOP.

(fn QOP HA1 HA2 NONCE NC CNONCE)
(defalias 'url-digest-auth-make-request-digest-qop #[1542 "\257\300\301\302#\262\303D\300\301\302#\262!\207" [mapconcat identity ":" md5] 14 (#$ . 5413)])
(put 'url-digest-auth-make-request-digest-qop 'byte-optimizer 'byte-compile-inline-expand)
#@222 Make an identifier for selecting a key in key cache.
The identifier is made either from URL or REALM.  It represents a
protection space within a server so that one server can have
multiple authorizations.

(fn URL REALM)
(defalias 'url-digest-auth-directory-id #[514 "\211\206\301\302!>\204\303\304\305D\"\210\306H!\206\307\207" [cl-struct-url-tags url-file-directory type-of signal wrong-type-argument url 6 "/"] 7 (#$ . 6024)])
(put 'url-digest-auth-directory-id 'byte-optimizer 'byte-compile-inline-expand)
#@234 Make an identifier for selecting a server in key cache.
The identifier is made from URL's host and port.  Together with
`url-digest-auth-directory-id' these identify a single key in the
key cache `url-digest-auth-storage'.

(fn URL)
(defalias 'url-digest-auth-server-id #[257 "\301\302\303!>\204\304\305\306D\"\210\307H\303!>\204$\304\305\306D\"\210\211\310H\206T\303!>\2049\304\305\306D\"\210\211\311H\205T\312\303!>\204O\304\305\306D\"\210\311H\313\"\262#\207" [cl-struct-url-tags format "%s:%d" type-of signal wrong-type-argument url 4 5 1 url-scheme-get-property default-port] 10 (#$ . 6551)])
(put 'url-digest-auth-server-id 'byte-optimizer 'byte-compile-inline-expand)
#@42 Compute a new unique client nonce value.
(defalias 'url-digest-auth-make-cnonce #[0 "\300\301\302\303 \304\305\306\"@#\306\"\207" [base64-encode-string format "%016x%016x" random time-convert nil t] 7 (#$ . 7255)])
#@263 The number requests sent to server with the given NONCE.
This count includes the request we're preparing here.

Currently, this is not implemented and will always return 1.

Value returned is in string format with leading zeroes, such as
"00000001".

(fn NONCE)
(defalias 'url-digest-auth-nonce-count #[257 "\300\301\302\"\207" [format "%08x" 1] 4 (#$ . 7477)])
#@135 Concatenate name-value pairs in association list PAIRS.

Output is formatted as "name1=\"value1\", name2=\"value2\", ..."

(fn PAIRS)
(defalias 'url-digest-auth-name-value-string #[257 "\300\301\302#\207" [mapconcat #[257 "\300\301\302@!A#\207" [format "%s=\"%s\"" symbol-name] 5 "\n\n(fn PAIR)"] ", "] 5 (#$ . 7846)])
#@180 Find credentials for URL object from the Emacs auth-source.
Return value is a plist that has `:user' and `:secret' properties
if credentials were found.  Otherwise nil.

(fn URL)
(defalias 'url-digest-auth-source-creds #[257 "\211\301\302\303!>\204\304\305\306D\"\210\307H\303!>\204%\304\305\306D\"\210\211\310H\206U\303!>\204:\304\305\306D\"\210\211\311H\205U\312\303!>\204P\304\305\306D\"\210\311H\313\"\262#\262\303!>\204i\304\305\306D\"\210\311H\314\315\314#\316\315\316#F\207" [cl-struct-url-tags format "%s:%d" type-of signal wrong-type-argument url 4 5 1 url-scheme-get-property default-port :user url-do-auth-source-search :secret] 11 (#$ . 8175)])
#@157 Prompt credentials for URL and REALM, defaulting to CREDS.
CREDS is a plist that may have properties `:user' and `:secret'.

(fn URL REALM &optional CREDS)
(defalias 'url-digest-prompt-creds #[770 "\300\301\302\303\206\304\305!\306\307 \310\311#\"\312Q\266\202\313\301\"\206&\314 \"#\262\300\315\316\317\320\313\315\"##\207" [plist-put :user read-string "Username [for " url-truncate-url-for-viewing url-recreate-url - window-width 10 20 "]: " plist-get user-real-login-name :secret read-passwd "Password: " nil] 16 (#$ . 8872)])
#@385 Find the best match for DIRKEY in key alist KEYLIST.

The string DIRKEY should be obtained using
`url-digest-auth-directory-id'.  The key list to search through
is the alist KEYLIST where car of each element may match DIRKEY.
If DIRKEY represents a realm, the list is searched only for an
exact match.  For directory names, an ancestor is sufficient for
a match.

(fn DIRKEY KEYLIST)
(defalias 'url-digest-auth-directory-id-assoc #[514 "\300\"\206:\301\302\"\205:\303\211\2047\2037\301\302@@\"\203)\304@@\"\2030@\262\202A\262\202\211\262\207" [assoc string-match "/" nil string-prefix-p] 6 (#$ . 9425)])
#@317 Find best match for URL and REALM from `url-digest-auth-storage'.
The return value is a list consisting of a realm (or a directory)
a user name, and hashed authentication tokens HA1 and HA2.
Modifying the contents of the returned list will modify the cache
variable `url-digest-auth-storage' itself.

(fn URL REALM)
(defalias 'url-digest-cached-key #[514 "\302\211\206\303\304!>\204\305\306\307D\"\210\310H!\206\311\266\202\312\313\314\304!>\2044\305\306\307D\"\210\315H\304!>\204G\305\306\307D\"\210\211\316H\206w\304!>\204\\\305\306\307D\"\210\211\317H\205w\320\304!>\204r\305\306\307D\"\210\317H\321\"\262#\262	\"A\"\207" [cl-struct-url-tags url-digest-auth-storage url-digest-auth-directory-id-assoc url-file-directory type-of signal wrong-type-argument url 6 "/" assoc format "%s:%d" 4 5 1 url-scheme-get-property default-port] 15 (#$ . 10058)])
#@188 Add key to `url-digest-auth-storage'.
KEY has the same format as returned by `url-digest-cached-key'.
The key is added to cache hierarchy under server id, deduced from
URL.

(fn KEY URL)
(defalias 'url-digest-cache-key #[514 "\211\302\303\304!>\204\305\306\307D\"\210\310H\304!>\204%\305\306\307D\"\210\211\311H\206U\304!>\204:\305\306\307D\"\210\211\312H\205U\313\304!>\204P\305\306\307D\"\210\312H\314\"\262#\262\211D	B\211\207" [cl-struct-url-tags url-digest-auth-storage format "%s:%d" type-of signal wrong-type-argument url 4 5 1 url-scheme-get-property default-port] 12 (#$ . 10952)])
#@483 Create a key for digest authentication method.
The USERNAME and PASSWORD are the credentials for REALM and are
used in making a hashed value named HA1.  The HTTP METHOD and URI
makes a second hashed value HA2.  These hashes are used in making
the authentication key that can be stored without saving the
password in plain text.  The return value is a list (HA1 HA2).

For backward compatibility, URI is allowed to be a URL cl-struct
object.

(fn USERNAME PASSWORD REALM METHOD URI)
(defalias 'url-digest-auth-create-key #[1285 "\205I\205I\205I\301E\302\303\304#\262!\266\203;\203(\202:\305!>\2047\306\307\310D\"\210\311H\301D\302\303\304#\262!\266\202D\207" [cl-struct-url-tags md5 mapconcat identity ":" type-of signal wrong-type-argument url 6] 14 (#$ . 11576)])
#@768 Compute authorization string for the given challenge using KEY.

The string looks like 'Digest username="John", realm="The
Realm", ...'

Part of the challenge is already solved in a pre-computed KEY
which is list of a realm (or a directory), user name, and hash
tokens HA1 and HA2.

Some fields are filled as is from the given URL, REALM, and
using the contents of alist ATTRS.

ATTRS is expected to contain at least the server's "nonce"
value.  It also might contain the optional "opaque" value.
Newer implementations conforming to RFC 2617 should also contain
qop (Quality Of Protection) and related attributes.

Restrictions on Quality of Protection scheme: The qop value
"auth-int" or algorithm any other than "MD5" are not
implemented.

(fn KEY URL REALM ATTRS)
(defalias 'url-digest-auth-build-response #[1028 "\205\321A@\3018\3028\303!>\204\304\305\306D\"\210\307H\310\311\"\243\310\312\"\243\310\313\"\243\314\315\316\317\nB\320
B\321B\322\nBF\204r\323\n\n\211D\324\325\326#\262\327D\324\325\326#\262!\266\205BC\202\303\330\230\203\274\331!\332 \333	B\334B\335B\323\f		\257\324\325\326#\262\327D\324\325\326#\262!\266\210BF\266\202\202\303\336\337\"\210\340\205\314\341BC#!P\266\207\207" [cl-struct-url-tags 2 3 type-of signal wrong-type-argument url 6 assoc "qop" "nonce" "opaque" "Digest " url-digest-auth-name-value-string append username realm nonce uri response mapconcat identity ":" md5 "auth" url-digest-auth-nonce-count url-digest-auth-make-cnonce qop nc cnonce message "Quality of protection \"%s\" is not implemented." nil opaque] 35 (#$ . 12376)])
#@547 Find or ask credentials for URL.

Primary method for finding credentials is from Emacs auth-source.
If password isn't found, and PROMPT is non-nil, query credentials
via minibuffer.  Optional REALM may be used when prompting as a
hint to the user.

Return value is nil in case either user name or password wasn't
found.  Otherwise, it's a plist containing `:user' and `:secret'.
Additional `:source' property denotes the origin of the
credentials and its value can be either symbol `authsource' or
`interactive'.

(fn URL PROMPT &optional REALM)
(defalias 'url-digest-find-creds #[770 "\300!\203\"\211\203\301\302\"\204\"\303#\262\304\305\306#\210\202(\304\305\307#\210\301\310\"\2057\301\302\"\2057\211\207" [url-digest-auth-source-creds plist-get :secret url-digest-prompt-creds plist-put :source interactive authsource :user] 8 (#$ . 14031)])
#@520 Find credentials and create a new authorization key for given URL and REALM.

Return value is the new key, or nil if credentials weren't found.
"New" in this context means a key that's not yet found in cache
variable `url-digest-auth-storage'.  You may use `url-digest-cache-key'
to put it there.

This function uses `url-digest-find-creds' to find the
credentials.  It first looks in auth-source.  If not found, and
PROMPT is non-nil, user is asked for credentials interactively
via minibuffer.

(fn URL REALM PROMPT)
(defalias 'url-digest-find-new-key #[771 "\302C\303\304\305\306\307!\310\"\311$\216\211\312#\240\205h\211\2067\313\314!>\204/\315\316\317D\"\210\320H!\2067\321\266\202\322\242\323\"\324\322\242\323\"\322\242\325\"	\206P\326\314!>\204a\315\316\317
D\"\210\n\320H%BB)\207" [cl-struct-url-tags url-request-method nil make-byte-code 0 "\300\242\205\301\300\242\302\"\303=?\205\304\301\300\242\305\"!\207" vconcat vector [plist-get :source authsource clear-string :secret] 4 url-digest-find-creds url-file-directory type-of signal wrong-type-argument url 6 "/" plist-get :user url-digest-auth-create-key :secret "GET"] 15 (#$ . 14902)])
#@668 Get the HTTP Digest response string for the specified URL.

If optional argument PROMPT is non-nil, ask for the username and
password to use for the URL and its descendants but only if one
cannot be found from cache.  Look also in Emacs auth-source.

If optional third argument OVERWRITE is non-nil, overwrite the
old credentials, if they're found in cache, with new ones from
user prompt or from Emacs auth-source.

If REALM is specified, use that instead of the URL descendant
method to match cached credentials.

Alist ATTRS contains additional attributes for the authentication
challenge such as nonce and opaque.

(fn URL &optional PROMPT OVERWRITE REALM ATTRS)
(defalias 'url-digest-auth #[1281 "\211\205`;\203\301!\202\302\303\"\211\203\203Q\304\203)\305\202+#\211\203@\203@\203@A\241\210\202P\211\203P\204P\306\211\262\"\210\210\211\205]\307$)\266\202\207" [enable-recursive-minibuffers url-generic-parse-url t url-digest-cached-key url-digest-find-new-key nil url-digest-cache-key url-digest-auth-build-response] 12 (#$ . 16091)])
#@105 A list of the registered authorization schemes and various and sundry
information associated with them.
(defvar url-registered-auth-schemes nil (#$ . 17181))
#@30 

(fn SERVER TYPE PARAMETER)
(defalias 'url-do-auth-source-search #[771 "\300\301\302\303\304&\211@\305\"\306!\203\211 \202\211\207" [auth-source-search :max 1 :host :port plist-get functionp] 10 (#$ . 17345)])
#@1110 Return an authorization string suitable for use in the WWW-Authenticate
header in an HTTP/1.0 request.

URL    is the url you are requesting authorization to.  This can be either a
       string representing the URL, or the parsed representation returned by
       `url-generic-parse-url'
REALM  is the realm at a specific site we are looking for.  This should be a
       string specifying the exact realm, or nil or the symbol `any' to
       specify that the filename portion of the URL should be used as the
       realm
TYPE   is the type of authentication to be returned.  This is either a string
       representing the type (basic, digest, etc), or nil or the symbol `any'
       to specify that any authentication is acceptable.  If requesting `any'
       the strongest matching authentication will be returned.  If this is
       wrong, it's no big deal, the error from the server will specify exactly
       what type of auth to use
PROMPT is boolean - specifies whether to ask the user for a username/password
       if one cannot be found in the cache

(fn URL REALM TYPE PROMPT &optional ARGS)
(defalias 'url-get-authentication #[1284 "CC\242\204\301\302\"\243\240\210\242\303\232\203\304\240\210\211\242;\203)\211\305\242!\240\210\2033\306=\203M\307\310\311\312\313\314\315	\"\316\"\317\320%\"\321\"\242\243\202\2049\203W\322!\262\301\227\"\243\242\211\205\202\323!\205\202\211\242\211\205|\242\304\211	\242%\242%\262\207" [url-registered-auth-schemes assoc "realm" "" nil url-generic-parse-url any sort mapcar make-byte-code 257 "\302A@!\203\211AAA@\300\242\303\211\301\242$B\207\304\303B\207" vconcat vector [fboundp nil 0] 7 "\n\n(fn SCHEME)" #[514 "A\204\300\207A\203\211A\204\301\207A\203#\211A\203#@@Y\207\300\207" [nil t] 4 "\n\n(fn X Y)"] symbol-name fboundp] 17 (#$ . 17576)])
#@622 Register an HTTP authentication method.

TYPE     is a string or symbol specifying the name of the method.
         This should be the same thing you expect to get returned in
         an Authenticate header in HTTP/1.0 - it will be downcased.
FUNCTION is the function to call to get the authorization information.
         This defaults to `url-?-auth', where ? is TYPE.
RATING   a rating between 1 and 10 of the strength of the authentication.
         This is used when asking for the best authentication for a specific
         URL.  The item with the highest rating is returned.

(fn TYPE &optional FUNCTION RATING)
(defalias 'url-register-auth-scheme #[769 ";\203\n\227\2029\203\301!\227\202\302\303!\206#\304\305\306Q!\204+\307\2027;\2036\310!\2027\311\"\312!\204J\313\314\315\316\"\"\210\211\203V\211B\241\202_BBB\211\207" [url-registered-auth-schemes symbol-name error "Bad call to `url-register-auth-scheme'" intern "url-" "-auth" 2 string-to-number assoc fboundp url-warn security format-message "Tried to register `%s' as an auth scheme, but it is not a function!"] 12 (#$ . 19447)])
#@70 Return non-nil if SCHEME is registered as an auth type.

(fn SCHEME)
(defalias 'url-auth-registered #[257 "\301\"\207" [url-registered-auth-schemes assoc] 4 (#$ . 20586)])
(provide 'url-auth)

Zerion Mini Shell 1.0