Page 1 of 1

How to read the "Authorization" header on a server code request?

Posted: Tue Dec 04, 2018 12:46 pm
by Joni de Campos

I need to get request header information in Server Code, so I can do Basic Authentication in my service.

The service will be used for integrating our service with client other tools.

Example:

Cliente tools call Our REST server code using Basic Authentication Token in the Header.
Server code reads the the Basic Authentication Token, compares to the token in the database and if it is correct execute code and returns a success response.
If token not correct it return a error response.


How to read the "Authorization" header on a server code request?

Posted: Tue Dec 04, 2018 1:05 pm
by Serhii Kulibaba

Hello Joni,

Please use the Server Code below for that prevar Authorization = request.header("Authorization");/pre


How to read the "Authorization" header on a server code request?

Posted: Tue Dec 04, 2018 7:07 pm
by Joni de Campos

Thanks for your fast reply....I will try and give you a feed back...