nerdexam
Cisco

350-201 · Question #22

Refer to the exhibit. How are tokens authenticated when the REST API on a device is accessed from a REST API client?

The correct answer is A. The token is obtained by providing a password. The REST client requests access to a resource. Token-based REST API authentication requires the client to first submit credentials to obtain a token, then use that token to request protected resources from the API.

Fundamentals

Question

Refer to the exhibit. How are tokens authenticated when the REST API on a device is accessed from a REST API client?

Exhibit

350-201 question #22 exhibit

Options

  • AThe token is obtained by providing a password. The REST client requests access to a resource
  • BThe token is obtained by providing a password. The REST API requests access to a resource
  • CThe token is obtained before providing a password. The REST API provides resource access,
  • DThe token is obtained before providing a password. The REST client provides access to a

How the community answered

(26 responses)
  • A
    96% (25)
  • D
    4% (1)

Why each option

Token-based REST API authentication requires the client to first submit credentials to obtain a token, then use that token to request protected resources from the API.

AThe token is obtained by providing a password. The REST client requests access to a resourceCorrect

In token-based authentication, the REST client first authenticates by providing a username and password to the API server, which returns a session token in exchange. The REST client then includes that token in subsequent HTTP requests to access protected resources, which is the standard credential-first token flow depicted in the exhibit.

BThe token is obtained by providing a password. The REST API requests access to a resource

The REST API server grants or denies access to resources; it does not itself 'request' access to a resource - that action belongs to the REST client.

CThe token is obtained before providing a password. The REST API provides resource access,

A token cannot be obtained before providing a password because the authentication server must first verify credentials before issuing any token.

DThe token is obtained before providing a password. The REST client provides access to a

The REST client requests resources from the API server; the client does not provide resource access to the API.

Concept tested: REST API token-based authentication flow

Source: https://developer.cisco.com/docs/ios-xe/#!authentication

Topics

#REST API#token authentication#API access control

Community Discussion

No community discussion yet for this question.

Full 350-201 Practice