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.

extract-user-name

(extract-user-name xml-element)

Given a parsed XML element from a get-token-info payload, extract the user name.

get-token-info

(get-token-info base-url token)

Query the CMR Access Control API for information assocated with the given 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.

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 CMR Access Control 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.