REST API Authentication

REST API Authentication

  

Hi to all,


I have configured a service account in lifetime like this: 

https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/LifeTime_Deployment_API/REST_API_Authentication

I send token in Authorization header:



In my rest service, i set Custom Authentication:


How can i check the token in my logic? Outsystems provides some method to check if the entered token is correct? I need a function like User_Login, but check token.


Thanks to all.


Hi Alberto,

I'm not sure I understand. Why do you create something in LifeTime when you're not consuming a LifeTime API, or are you?

You set authentication to custom. A new event handler is available in which you can code your local to validate the request authorization. You can use http server actions to retrieve the token from the header.

Kilian Hekhuis wrote:

Hi Alberto,

I'm not sure I understand. Why do you create something in LifeTime when you're not consuming a LifeTime API, or are you?

Hi Kilian,


I thought that this user could be used both in LifeTime Api and in a custom Api.


Thank you.


I don't think that's the case, no.

Kilian Hekhuis wrote:

I don't think that's the case, no.

Ok Kilian, thanks!!!