Loading

How to define a custom security scheme in API RAML 1.0?

Date de publication: Aug 5, 2025
Tâche

GOAL

Be able to define a custom security scheme in API RAML 1.0 which is not standard to RAML like (OAuth 1.0, OAuth 2.0, Basic Authentication, Digest Authentication or Pass Through).
Étapes

To implement this you will need to use the type x-custom in your Security Scheme as explained here: https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#x-other

As an example, please find a sample API Specification called "Songs API" with 2 endpoints:
/songs is used to get a list of songs based on the song title and uses a Basic Authentication
/songs/{songId} is used to get the song with `songId = {songId}` and uses a Custom Authentication (and validates the request by using a Bearer token)

You can download the sample project here: Songs API
Numéro d’article de la base de connaissances

001114687

 
Chargement
Salesforce Help | Article