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.
Question
Refer to the exhibit. How are tokens authenticated when the REST API on a device is accessed from a REST API client?
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)- A96% (25)
- D4% (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.
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.
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.
A token cannot be obtained before providing a password because the authentication server must first verify credentials before issuing any token.
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
Community Discussion
No community discussion yet for this question.
