ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing JWT Token & authentication with ESQl

Post new topic  Reply to topic
 Parsing JWT Token & authentication with ESQl « View previous topic :: View next topic » 
Author Message
Lone_Wanderer
PostPosted: Mon Jan 16, 2017 1:46 am    Post subject: Parsing JWT Token & authentication with ESQl Reply with quote

Newbie

Joined: 16 Jan 2017
Posts: 8

I have encoutered an interesting problem with authentication. I'm developing REST service which will be given JWT token. This token then needs to be decoded and parsed for required information. After the information about the user is received, the user is either declined or granted access. Now, the parsing and decoding part is not a problem. I have following code for that:



Code:
DECLARE    EncTokenHead    CHAR    InputLocalEnvironment.REST.Input.Parameters.head;
 DECLARE    EncTokenBody   CHAR    InputLocalEnvironment.REST.Input.Parameters.body;
 DECLARE    EncTokenSign   CHAR    InputLocalEnvironment.REST.Input.Parameters.sign;
      
      DECLARE    DecTokenHead   BLOB   BASE64DECODE(EncTokenHead);
      DECLARE    DecTokenBody    BLOB    BASE64DECODE(EncTokenBody);
      DECLARE    DecTokenSign   BLOB   BASE64DECODE(EncTokenSign);
      
   DECLARE    CasTokenHead   CHAR    CAST(DecTokenHead AS CHARACTER CCSID 1208);
   DECLARE    CasTokenBody   CHAR    CAST(DecTokenBody AS CHARACTER CCSID 1208);
   DECLARE    INEX         CHAR    


Now, the first 3 variables are for my testing, the test service I made accepts 3 parameters, each parameter for the respective encoded part of the token. The real service wont use those parts as parameters and here is my problem. How do I reach the token? Is it part of HTTP header within the message tree or do I have to pass it really as parameters. I'm asking because I have to adress these parts somehow and I don't know where whithin the enviroment I should look for them.

Any help is appreciated.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing JWT Token & authentication with ESQl
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.