oauth2-purpose-01 | August 2025 | |
Postnikov | Standards Track | [Page] |
This specification introduces a new OAuth 2.0 RFC6749 extension to capture a transaction level human readable purpose for any OAuth 2.0 authorization (e.g.: limited access to an HTTP service). Purpose is intended to be displayed to a resource owner during and after the approval interaction.¶
The key words "shall", "shall not", "should", "should not", "may", and "can" in this document are to be interpreted as described in ISO Directive Part 2. These key words are not used as dictionary terms such that any occurrence of them shall be interpreted as key words and are not to be interpreted with their natural language meanings.¶
The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.¶
RFC6749 - The OAuth 2.0 Authorization Framework¶
"purpose" is a text description that provides context to the Resource Owner about the authorization request. This human-readable string appears in the Authorization Server's user interface during the authorization flow and/or afterwards.¶
To set a transaction specific purpose, use the additional purpose parameter as part of the request: purpose={Purpose}
.¶
The purpose
parameter value:¶
If these rules are violated, the authorization request shall fail and the authorization response redirection URL (HTTP status code 302) will contain the parameters error=invalid_request
and error_description=invalid_purpose
.¶
=======¶
In line with section 10.14 of OAuth 2.0 specification RFC6749, the authorization server shall validate any value received in purpose parameter.¶
Apart from syntactic validation (e.g. length), the authorization server may apply additional semantic validation.¶
The string containing purpose parameter shall be encoded and escaped before displaying it in any UI. See OWASP section C4 recommendations for more details.¶
We would like to thank Daniel Fett, Mark Haine, Joseph Heenan, Ralph Bragg, Paul Ruskin, Igor Janicijevic, Diogo Goncalves and others for their valuable feedback and contributions that helped to evolve this specification.¶
Published: 21st September 2023¶
Changes:¶