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 should have the following components:
  • "ConsumerKey"application client ID
    "ConsumerSecret"application client secret
    "OAuthVersion"OAuth version ("1.0a")
    "OAuthType"OAuth workflow type ("OneLegged", "TwoLegged", )
  • The following additional entries can also be given in the association:
  • "SignatureMethod"{"HMAC","SHA1"}algorithm used in signature creation in OAuth 1.0a
    "TransmissionMethod""Headers"location of OAuth signature in requests
    "OAuthToken"Nonetoken for one-legged OAuth 1.0a
    "OAuthTokenSecret"Nonetoken secret for one-legged OAuth 1.0a
    "RequestTokenURL"Noneendpoint for temporary request tokens
    "AccessTokenURL"Noneendpoint for access grant tokens
    "CallbackURL"AutomaticURL to send the user to after completing authorization
    "VerifierInputFunction"Automaticfunction that returns the OAuth verifier to complete the workflow
    "Name"Nonename for the SecuredAuthenticationKey
  • "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:
  • Automatica simple page provided by Wolfram to display an OAuth verifier
    Inheriteda callback URL has been provided out of band (oob)
    "string"the URL of a custom callback page
  • "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" and "Query".
  • URL["url"] is also supported in the "RequestTokenURL", "AccessTokenURL" and "CallbackURL" fields.

Examples

open allclose all

Basic Examples  (2)

Create a SecuredAuthenticationKey to authenticate a call to Flickr's test API using three-legged OAuth. 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:

Use the key to send signed requests to a service:

Scope  (3)

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:

Check that the key is working:

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:

VerifierInputFunction  (1)

Create a key that uses a custom VerifierInputFunction. Use your Flickr consumer key and secret to evaluate the example properly:

Introduced in 2017
 (11.2)
 |
Updated in 2019
 (12.0)