SecuredAuthenticationKey
SecuredAuthenticationKey[assoc]
represents a secured authentication key with credentials and details specified by the association assoc.
Details




- SecuredAuthenticationKey is used to provide low-level OAuth credentials to various connections.
- In SecuredAuthenticationKey[assoc], assoc has different requirements based on the version of OAuth.
- SecuredAuthenticationKey is a symbolic representation of OAuth credentials used when making a connection; the credentials are not used until a connection is attempted.
- For OAuth 1.0a, assoc must have the following keys:
-
"OAuthVersion" "1.0a" "ConsumerKey" consumer key or application client ID "ConsumerSecret" consumer secret or application client secret "OAuthType" OAuth workflow type "RequestTokenURL" endpoint for temporary request tokens "AccessTokenURL" endpoint for access grant tokens - "OAuthType" supports the following workflows:
-
"OneLegged" sign a single request to access the service directly "TwoLegged" retrieve and use tokens to access the service "ThreeLegged" complete OAuth 1.0a spec workflow including user login - "AccessTokenURL" and "RequestTokenURL" support the following forms:
-
"url" URL giving the access token {"url","method"} specify the HTTP method, e.g. ("GET","POST",…) - The following additional entries can also be given in the association:
-
"Name" None name for the SecuredAuthenticationKey "OAuthToken" None token for one-legged OAuth 1.0a "OAuthTokenSecret" None token secret for one-legged OAuth 1.0a "UserAuthorizationURL" None endpoint for user authorization "CallbackURL" Automatic URL to send the user to after authorization "VerifierInputFunction" Automatic function that handles the authorization code - "CallbackURL" supports the following values:
-
Automatic a page provided by Wolfram to display an OAuth verifier Inherited a callback URL has been provided out of band (oob) "url" the URL of a custom callback page - "VerifierInputFunction" supports the following values:
-
Automatic prompts user to complete the workflow with a dialog "WolframConnectorChannel" use the Wolfram channel broker to complete the workflow - "SignatureMethod" supports the following key-generation, hash-algorithm pairs:
-
{"HMAC","MD2"} 128-bit HMAC-MD2 signature {"HMAC","MD5"} 128-bit HMAC-MD5 signature {"HMAC","SHA1"} 160-bit HMAC-SHA1 signature {"HMAC","SHA256"} 256-bit HMAC-SHA256 signature {"HMAC","SHA384"} 384-bit HMAC-SHA384 signature {"HMAC","SHA512"} 512-bit HMAC-SHA512 signature - Possible settings for "TransmissionMethod" include:
-
"Headers" all credentials are passed in the authorization headers "Query" all credentials are passed with URL query parameters - URL["url"] is also supported in the "RequestTokenURL", "AccessTokenURL", "UserAuthorizationURL" and "CallbackURL" fields.
- In SecuredAuthenticationKey[assoc], assoc must have the following keys:
-
"OAuthVersion" 2.0 "OAuthType" OAuth workflow type "ClientID" application client ID "ClientSecret" application client secret "AccessTokenURL" endpoint for access grant tokens - "OAuthType" supports the following workflows:
-
"ClientCredentials" client is acting on its own behalf "AuthorizationCode" retrieve and use tokens to access the service - The following additional keys can also be given in assoc:
-
"Name" None name for the SecuredAuthenticationKey "RedirectURI" Automatic URI to send the user after authorization "Scopes" None list of OAuth 2.0 scopes "TransmissionMethod" "Headers" how credentials are passed during the workflow "UserAuthorizationURL" None endpoint for user authorization "VerifierInputFunction" Automatic function that handles the authorization code - "AccessTokenURL", "RequestTokenURL" and "UserAuthorizationURL" support the following forms:
-
"url" URL giving the access token {"url","method"} specify the HTTP method, e.g. ("GET","POST",…) - "Scopes" supports the following values:
-
None no additional permissions requested from the user {"scope",…} a list of permission scopes to request from the user {{"scope",…},"scopeDelimiter"} a list of permission scopes with a nonstandard delimiter - "RedirectURI" supports the following values:
-
Automatic a page provided by Wolfram to display an OAuth verifier "uri" the URI of a custom callback page - "VerifierInputFunction" supports the following values:
-
Automatic prompts user to complete the workflow with a dialog "WolframConnectorChannel" use the Wolfram channel broker to complete the workflow - Possible settings for "TransmissionMethod" include:
-
"Headers" all credentials are passed in the request headers "Body" all credentials are passed in the request body - URL["url"] is also supported in the "AccessTokenURL", "UserAuthorizationURL" and "RedirectURI" fields.
OAuth 1.0a
OAuth 2.0
Examples
open allclose allBasic Examples (1)
Create a SecuredAuthenticationKey using the "AuthorizationCode" OAuth 2.0 workflow:
Scope (13)
Basic Uses (2)
Create a basic SecuredAuthenticationKey:
Specify additional URL parameters such as "myParam" using URLBuild:
OAuth 1.0a (5)
"One-Legged" (1)
Create a SecuredAuthenticationKey using the "OneLegged" OAuth 1.0a workflow, typically used when OAuth tokens are already acquired:
"Two-Legged" (1)
Create a SecuredAuthenticationKey using the "TwoLegged" OAuth 1.0a workflow:
"Three-Legged" (3)
Create a SecuredAuthenticationKey using the "ThreeLegged" OAuth 1.0a workflow:
Execute a basic request using the authentication key:
Deploy a custom page to display the verifier code:
Specify the redirect URI when using an OAuth 1.0a three-legged workflow:
Check that the key is working:
Use Inherited to create a SecuredAuthenticationKey where the callback URL has been established separately with the service or out of band:
OAuth 2.0 (6)
"AuthorizationCode" (2)
Create a SecuredAuthenticationKey using the "AuthorizationCode" OAuth 2.0 workflow:
Execute a basic request using the authentication key:
Specify the redirect URI when using an OAuth 2.0 authorization code workflow:
"ClientCredentials" (1)
Create a SecuredAuthenticationKey using the "ClientCredentials" OAuth 2.0 workflow:
"Scopes" (2)
Text
Wolfram Research (2017), SecuredAuthenticationKey, Wolfram Language function, https://reference.wolfram.com/language/ref/SecuredAuthenticationKey.html (updated 2019).
CMS
Wolfram Language. 2017. "SecuredAuthenticationKey." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/SecuredAuthenticationKey.html.
APA
Wolfram Language. (2017). SecuredAuthenticationKey. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SecuredAuthenticationKey.html