Search code examples
restgrailsjwtsiteminderpre-authentication

JWT Token generation in Grails with Preauthentication


I have a grails 3 application where authentication is done by Siteminder. After the user is authenticated we should be able to generate a JWT token and using that other rest apis call be protected. I have used RequestHeaderAuthenticationFilter to authenticate the request header. Can anyone help in integrating JWT token in this scenario.

Thanks is advance


Solution

  • I achieved it by using a custom token generator which is called after the request header authentication and saved the token in http response header. Created a custom rest token validation filter to validate the token in API calls