Method: authenticateWithToken

Attempts to authenticate a user with an existing token.

If the integrator returns a success, then it has verified that the user is authenticated with the provided token.

The requestId can be used as an authenticationRequestId in a future associateAccount call. The combination of requestId within the header and paymentIntegratorAccountId is the idempotency key and uniquely identifies this challenge request. The Association PIAID should be used in this request.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type ErrorResponse.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "cmVxdWVzdDF",
    "requestTimestamp": {
      "epochMillis": "1481899949605"
    },
    "paymentIntegratorAccountId": "InvisiCashUSA_USD"
  },
  "existingToken": {
    "operatorUserToken": {
      "token": "Zr9Pd118pzTyFtHFkBGj",
      "issuerId": {
        "value": "InvisiCashUSA"
      }
    }
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1481899949655"
    }
  },
  "result": {
    "success": {}
  }
}

HTTP request

POST https://www.integratorhost.example.com/integrator-base-path/carriers-v1/authenticateWithToken

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "existingToken": {
    object (Token)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

existingToken

object (Token)

REQUIRED: The existing token that may serve as proof of authentication.

Response body

This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse, consult the ErrorResponse object and HTTP status codes documentation.

Possible response messages
HTTP 200 Status

object (AuthenticateWithTokenResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

Token

The token that may serve as proof of authentication.

JSON representation
{

  // Union field token can be only one of the following:
  "operatorUserToken": {
    object (OperatorUserToken)
  }
  // End of list of possible types for union field token.
}
Fields
Union field token. REQUIRED: The different token options that may serve as proof of authentication. token can be only one of the following:
operatorUserToken

object (OperatorUserToken)

The DCB3 Operator User Token that is being used for authentication.

OperatorUserToken

The DCB3 Operator User Token and corresponding Issuer ID.

JSON representation
{
  "token": string,
  "issuerId": {
    object (IssuerId)
  }
}
Fields
token

string

REQUIRED: The DCB3 Operator User Token that was provided by the carrier on the DCB3 integration.

issuerId

object (IssuerId)

REQUIRED: The issuer ID of the carrier that provided this Operator User Token.

AuthenticateWithTokenResponse

Response object for the authenticateWithToken method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (AuthenticationResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (AuthenticationResult)

REQUIRED: Result of the carriers-v1.authenticateWithToken call.

AuthenticationResult

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "authenticationFailed": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields

Union field result.

result can be only one of the following:

success

object (Empty)

The user was authenticated successfully.

authenticationFailed

object (Empty)

The user was not authenticated and the current flow should be aborted or authentication should be retried.