Basic Authentication for rest api

HI I am new to the outsystem platform, I just want to create an rest api with basic authentication followed the steps as is in document but i did not find the user_login action anywhere. How to add the user_login action and what should be the condition in it. Can anyone help me on it?

Hi, 

It is in the Users module. You need to mark it in the manage dependencies. 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/Users_API#User_Login

Open manage dependencies (the plug icon in the top bar in SS) , find the Users module, select it, and in the right panel mark the action. 

Now you can use it in your logic. 

Cheers. 

Eduardo Jauch wrote:

Hi, 

It is in the Users module. You need to mark it in the manage dependencies. 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/Users_API#User_Login

Open manage dependencies (the plug icon in the top bar in SS) , find the Users module, select it, and in the right panel mark the action. 

Now you can use it in your logic. 

Cheers. 

Thanks for the reply, But can i have my own string values for the user name and password instead of user details?


Hi, 

No. To use User_login you need to use valid username and password, meaning that both must be present in the entity User. You can create users dynamically or using the Users app. 

You should finish the Web online training as there is basic information on how to deal with Users in an OutSystems app. 

What are you trying to accomplish? Any reason for you to not want to use OutSystems users? 

Cheers. 

Hi laxmiprasanna b,

What's your goal with implementing Basic Authentication on your exposed REST API? In general Basic Authentication checks against the OutSystems User info to determine if it has been provided with correct credentials, so that know which user is interacting with the system.

Jorge Martins wrote:

Hi laxmiprasanna b,

What's your goal with implementing Basic Authentication on your exposed REST API? In general Basic Authentication checks against the OutSystems User info to determine if it has been provided with correct credentials, so that know which user is interacting with the system.


I want to expose a webservice with authentication that should need username and password as normal strings(not a user details) to validate the requst?


Hi,

What do you mean by "user details"?

The OnAuthentication action will have two parameters you use in the user_login action.

The person calling the methods will have to provide the credentials...

Cheers.

Eduardo Jauch wrote:

Hi,

What do you mean by "user details"?

The OnAuthentication action will have two parameters you use in the user_login action.

The person calling the methods will have to provide the credentials...

Cheers.

Intially we have a Azure login to our application later we need to provide api with security how we can achive this?


Hi,

You can use external providers to login in the OutSystems application, but to take full advantage of OutSystems platform, the login must also be done in the Platform (after validation in the external provider).

Please, take a look into the External Authentication videos so you can see different examples on how to authenticate using external providers: https://www.outsystems.com/learn/courses/120/authentication/

Notice that external authentication is an intermediary concept, so you must be comfortable with the platform to be able to fully understand it (in my opinion).

Cheers.