SecuredAuthenticationKey
SecuredAuthenticationKey[assoc]
represents a secured authentication key with credentials and details specified by the association assoc.
Details
- SecuredAuthenticationKey is a symbolic representation of OAuth credentials used in an authentication process; it does not itself perform authentication.
- In SecuredAuthenticationKey[assoc], assoc has different requirements based on the version of OAuth.
- For OAuth 1.0a, assoc must have the following components:
-
"OAuthVersion" "1.0a" "ConsumerKey" consumer key or application client ID "ConsumerSecret" consumer secret or application client secret "OAuthType" OAuth workflow type ("OneLegged", "TwoLegged", …) "RequestTokenURL" endpoint for temporary request tokens "AccessTokenURL" endpoint for access grant tokens - 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 completing authorization "VerifierInputFunction" Automatic function that returns the OAuth verifier to complete the workflow - "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 - "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 components:
-
"OAuthVersion" 2.0 "OAuthType" OAuth workflow type ("TwoLegged", "ThreeLegged") "AccessTokenURL" endpoint for access grant tokens - The following additional entries can also be given in the association:
-
"Name" None name for the SecuredAuthenticationKey "ClientCredentials" None application credentials "UserAuthorizationURL" None endpoint for user authorization "CallbackURL" Automatic URL to send the user to after completing authorization "VerifierInputFunction" Automatic function that returns the OAuth verifier to complete the workflow "Scopes" None list of OAuth 2.0 scopes "State" Automatic OAuth 2.0 CSRF state parameter "ResponseType" "code" OAuth 2.0 response type "ScopeDelimiter" None character to delimit scopes "AdditionalParameters" None nonstandard additional request parameters "AdditionalResponseParameters" None additional response parameters to be stored - "ClientCredentials" is an association with the following components:
-
"ConsumerKey" consumer key or application client ID "ConsumerSecret" consumer secret or application client secret - "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 - In OAuth 2.0, "CallbackURL" is also known as a redirect URI.
- "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:
-
"Query" all credentials are passed in the query parameters "Body" all credentials are passed in the body parameters - "AdditionalParameters" is specified by giving the following components in an association:
-
"AccessRequest" list of key-value pairs to send as additional parameters with the access request "AuthorizationRequest" - list of key-value pairs to send as additional parameters with the authorization request
- "AdditionalResponseParameters" is specified by giving the following components in an association:
-
"AccessRequest" list of keys to receive as additional parameters with the access request response "AuthorizationRequest" - list of keys to receive as additional parameters with the authorization request response
- "AdditionalResponseParameters" values are stored in $SecuredAuthenticationKeyTokens.
- URL["url"] is also supported in the "AccessTokenURL", "UserAuthorizationURL" and "CallbackURL" fields.
OAuth 1.0a
OAuth 2.0
Examples
open allclose allBasic Examples (6)
Create a SecuredAuthenticationKey to authenticate a call to a sample API using one-legged OAuth 1.0a:
Create a SecuredAuthenticationKey to authenticate a call to a sample API using two-legged OAuth 1.0a:
Create a SecuredAuthenticationKey to authenticate a call to Flickr's test API using three-legged OAuth 1.0a. Use your Flickr consumer key and secret to evaluate the example properly:
Check that the key is working:
Create a SecuredAuthenticationKey with credentials from an external service, using two-legged OAuth 1.0a:
Use the key to send signed requests to a service:
Create a SecuredAuthenticationKey to authenticate a call to Twitter's API using two-legged OAuth 2.0. Use your Twitter consumer key and secret to evaluate the example properly:
Check that the key is working:
Create a SecuredAuthenticationKey to authenticate a call to LinkedIn's API using three-legged OAuth 2.0. Use your LinkedIn consumer key and secret to evaluate the example properly:
Scope (28)
AccessTokenURL (2)
AdditionalParameters (3)
AdditionalResponseParameters (3)
Specify additional response parameters to be received from the server along with the authorization request response:
Specify additional response parameters to be received from the server along with the access request response:
Specify additional response parameters to be received from the server along with the authorization and access request responses:
CallbackURL (2)
URL (1)
Deploy a custom page to display the verifier code:
Use the URL in the SecuredAuthenticationKey. Use your Flickr consumer key and secret to evaluate the example properly:
Inherited (1)
Use Inherited to create a SecuredAuthenticationKey where the callback URL has been established separately with the service, or out of band. Use your Twitter consumer key and secret to evaluate the example properly:
ClientCredentials (1)
Define the client credentials for the SecuredAuthenticationKey by providing an association with the consumer key and consumer secret:
Name (1)
Define a custom name for the SecuredAuthenticationKey:
SignatureMethod (1)
TransmissionMethod (3)
VerifierInputFunction (3)
OAuth 1.0a (1)
OAuth 2.0 (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