berikboltt
(Berikboltt)
#1
Hi all. We have created custom controller protected by oauth2 and defined the request path like this /rest/rapi/test_rapi.
When doing this do we need to define custom Custom Authentication to custom controller or not ? .
And how to pass the header informations and security credentials to the custom controller by rest client such as postman.
Thank you very much .
1 Like
artamonov
(Yuriy Artamonov)
#3
Hi,
If you created your controller following Creating Custom OAuth2 Protected Controllers - CUBA Platform. Developer’s Manual manual then there is no need to implement custom authentication. Simply pass OAuth2 token to the rest-api as described here: Getting an Entity Instances List - CUBA Platform. Developer’s Manual
An OAuth token must be put in the Authorization header with the Bearer type:
Authorization: Bearer 29bc6b45-83cd-4050-8c7a-2a8a60adf251
Get OAuth2 token with Postman (do not forget Headers)


Then call your custom controller (from doc example Creating Custom OAuth2 Protected Controllers - CUBA Platform. Developer’s Manual):

artamonov
(Yuriy Artamonov)
Split this topic
#5