what is the best way to apply token authentication for grails rest api?
I found the following plugin
http://grails.org/plugin/spring-security-rest
but the plugin has a problem when a request comes from other domains
Related
I am developing Rest Api using grails. It is working on localhost:8080. when I am calling with POSTMAN it responded with json. I want to use this data and also perform CRUD operation on my web page which is running on other domain. When I am trying to call RESTAPI which is written in grails, the browser is not able to get a response due to Access-Control-Allow-Origin. So how to enable CORS functionality in my REST API, So anyone can access from a different domain.
If you are using Grails 3.2.1 or higher, it comes with CORS support built in.
In your application.yml, add the following:
grails:
cors:
enabled: true
See http://docs.grails.org/latest/guide/introduction.html#whatsNewCors for further details.
Hi after reading quite a number of answers on how to set the authorization header in swagger I am still facing an issue trying to authenticate the TIBCO AMX BPM rest services using swagger.
I know that there is no issue with the user name or password that have been provided to me as I'm able to invoke this rest api from the soapui tool.
Please advise on how I can go about authenticating this API in Swagger editor.
screenshot of the swagger editor screen.
SoapUI Screenshot
I have developed a Rest API using Jersey for my Java application and also implemented basic authentication. Is it possible to authenticate a user from the database instead of authenticating them through the Web.xml file?
I am using spring security plugin in my grails 2.3.1 app,
I want to expose my controller as rest api,
So that mobile apps can access it.. so do i authenticate my users through my grails controller
Basic auth over SSL is common for REST APIs, and the plugin docs show how to configure Basic auth for part of the app, and standard form-based auth for user-accessible parts of the app. There's also a new plugin for REST + Spring Security - see http://grails.org/plugin/spring-security-rest and click through the "Documentation" button to see the docs.
I developed a Rest web service with Play! Framework. I aim to secure access to this WS. I'm discovering OAuth2 and it seems to be a good solution in my case. However, instead of using an external OAuth2 provider, I prefer to manage this part myself. So, I installed the last snapshot of OpenAM (12.0.0), which can do this. I have an instance of Active Directory on which the authentication should be based.
I have access to the documentation but I don't know how proceed. I would like to have some tracks.
Thanks for your help.