barry.hutchison Posted August 21, 2018 Share Posted August 21, 2018 Hello, I have implemented token based authentication on our jasper server. I am trying to secure the token authentication by only allowing the token to be used inside the header of the login and header of the visualize.js authentication. I encrypted the token by implementing the CipherI interface to secure it. Inside applicationContext-externalAuth-preAuth-mt I have changed the 'tokenInRequestParam' to false:<property name="tokenInRequestParam" value="false"/>This means the pp token can only be accepted from the headers of my request, not the URL.The problem arises when I want to authenticate with Visualise.js. Since I only want to allow the token in the headers how do I configure this for my Visualize.js login ? I have tried:visualize({ server: window.location.origin + '/jasperserver-pro', auth: { headers:{ token: token, preAuth: true, tokenName: "pp" } }},[/code]But it returns an error stating headers is an unrecognised parameter.How can I implement the visualise js login to accept the token from the header?This is for jasper server 6.2.1Thanks. Link to comment Share on other sites More sharing options...
barry.hutchison Posted September 10, 2018 Author Share Posted September 10, 2018 Any input from some staff on this? Cheers Link to comment Share on other sites More sharing options...
barry.hutchison Posted September 10, 2018 Author Share Posted September 10, 2018 Any input from staff on this please? Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted July 22, 2020 Share Posted July 22, 2020 There is an answer that might be helpful at https://community.jaspersoft.com/questions/1105341/how-log-visualizejs-when-token-authentication-only-permitted-through-headers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now