Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

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

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

Hello Joni,

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

Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

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

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

Return to “Issues”