cmr.opendap.auth.token

The functions in this API are responsible for such things as making queries to CMR Access Control to get token-to-user mappings, extracting tokens from request headers, and defining caching keys and related tasks.

->cached-user

(->cached-user system token)

Look up the user for a token in the cache; if there is a miss, make the actual call for the lookup.

->user

(->user base-url token)

Given a token, return the associated user name.

extract

(extract request)

Extract the value of Echo-Token header that was passed in the request.

find-xml

(find-xml xml-str in-keys)

Documentation forthcoming

get-token-info

(get-token-info base-url token)

Query the CMR Access Control API for information assocated with the given token.

parse-token

(parse-token xml-str)

Parse the XML that is returned when querying the CMR Access Control API for the token.

parse-token-data

(parse-token-data xml-str)

Parse the XML that is returned when querying the CMR Access Control API for token info.

parse-username

(parse-username xml-str)

Parse the XML that is returned when querying the CMR Access Control API for the username associated with the token.

token-data-key

(token-data-key token)

Generate a key to be used for caching token data.

token-info-resource

The path segment to the ECHO REST API resource that is queried in order to get user/token mappings.

user-id-key

(user-id-key token)

Generate a key to be used for caching user-id data.