I want to expose a rest api authenticate use token, how can i do it?
I have looked some components in forge like JSON Web Tokens (JWT) , but it just some server action that genarate token or read token, there's not how to implement token based authentication for REST apis , where and how to save the token after token genarated, also correspondly how to consume it.
Is there some sample to understand it.
Hi Liu,
Maybe my article on exposing a REST service with OAuth could be of help.
thank you for reply.
Sorry I cant't access and open this link, if possibly, take the capture of this article , it will be very helpful, thank you !
Mmm, weird, I think the link was bad. I updated it in the post above, it's this: https://itnext.io/exposing-an-outsystems-rest-service-with-an-oauth-style-authorization-fded258cbe14
Hi @liu dan
There is two types of authentication in expose API from Outsystems.
1. Basic - It'll take username and password and try to login by Outsystems users entity.
2. Custom - You are free to implement your own logic's here.
Here is some documentation which can help you.
Revoking an authentication token
Add Custom Authentication to an Exposed REST API
I hope it'll help you.
ThanksDeep