Skip to content

das2c_creds

C. Piker edited this page Dec 12, 2023 · 3 revisions

FUNCTION

das2_creds

PURPOSE

List credentials sent to servers under matching conditions

CALLING SEQUENCE

struct_ary = das2c_cred()
struct_ary = das2c_cred(url)
struct_ary = das2c_cred(url, realm)
struct_ary = das2c_cred(url, realm, param, value)

OPTIONAL INPUTS

Parameter Type Purpose
url String Provides a URL, or portion of a URL without fragments or query parameters
realm String Providing the RFC-7617 authentication realm string (see https://httpwg.org/specs/rfc7617.html)
param String A query parameter name that must match before the credentials will be sent.

Since das2dlm is built against das2C v2.3, only 'dataset' is understood as a match parameter

value String A query parameter value for the given PARAM above that must match before credentials are sent.

OUTPUT

An array of DAS2C_CRED structures that match the given arguments. These have the following fields.

Field Type Purpose
URL String The network URL that must match before this credential would be sent
REALM String The realm that must be requested before this credential would be sent.
PARAM String A parameter that must be present in the request before this credential would be sent, may be empty.
VALUE String The value of PARAM that must be present before this credential is sent, may be empty.
HASH String The HTTP basic authentication hash that would be sent to the server. This is not the password, but is trivially related to it.
VALID Long Defaults to 1. Set to 0 if this credential has failed to allow access to an expected resource during the current IDL session.

EXAMPLES

  1. List all your credentials that are used for U. Iowa Physics Department servers:

    credentials = das2_cred('physics.uiowa.edu')
  2. List the credentials that would be sent if accessing a resource that has the HTTP GET parameter 'dataset' with a value of 'Juno/WAV/Survey' to the service at 'https://jupiter.physics.uiowa.edu/das/server':

    sSrvRoot = 'https://jupiter.physics.uiowa.edu/das/server'
    sRealm   = 'Juno Magnetospheric Working Group'
    sDataset = 'Juno/WAV/Survey'
    cred = das2_cred(sSrvRoot, sRealm, 'dataset', sDataset)

NOTES

For security purposes, das2C does not send your authentication credentials out unprompted. Credentials are only sent if the server requests them and then, only if the URL, Realm and optionally a Parameter in the URL match the expected conditions.

MODIFICATION HISTORY

C. Piker, 2023-12-11 - Initial Version

Clone this wiki locally