PT-AM-CPE practice question 4 of 35
Which of the following code examples inserts a may_act claim to the resulting token in a PingAM implementation?
Full set: 100 questionsIn PingAM's OAuth 2.0 scripting, the requestedToken object represents the token that is being created and will be issued. The addMayAct(mayAct) method is the specific API call available on this object to insert the mayact claim, which is used for delegation in token exchange scenarios as defined by RFC 8693. The mayAct variable passed to the method must be a JSON object containing the claims for the party that is authorized to act on behalf of the subject.
A. var mayAct = ... token.addMayAct(mayAct): The token object typically represents the incoming or original token, not the new token being issued, making this the incorrect object to modify.
C. var mayAct = ... requestedToken.setMayAct(mayAct): The correct method name in the PingAM scripting API is addMayAct, not setMayAct.
D. var mayAct = ... token.setMayAct(mayAct): This uses both the incorrect object (token) and an incorrect method name (setMayAct).
PingAM Documentation, "Scripts Guide" -> "Scripting API" -> "RequestedToken (Scripting API)". The API documentation lists addMayAct(Object mayAct) as a method on the RequestedToken object, used to "Add the mayact claim to the token." This object is explicitly used in OAuth 2.0 access token modification scripts.
Keep practicing
Take the free PT-AM-CPE practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PT-AM-CPE practice questions
- Question 1Which area of PingAM does affinity mode relate to?
- Question 2Which of the following actions can be specified in a policy by default?
- Question 3Which of the following parameters must be provided by the edge client when requesting ste…
- Question 5A user enters their credentials, but is faced with the error message "user requires profi…
- Question 6The Core Token Service (CTS) can be used for storing which of the following?
- Question 7Sam wants to start a service provider-initiated single sign-on and redirect to their own …
