Loading

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

Data pubblicazione: Aug 5, 2025
Operazione

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).
Fasi

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
Numero articolo Knowledge

001114687

 
Caricamento
Salesforce Help | Article