Simple Grails plugin to add Oauth like authorization to existing API
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Secure API Grails plugin

Simple Grails plugin to add Oauth like authorization to existing API


This project contains the open source Secure API Grail Plugin that allows you to easily add authorization to your provided API.

I created this plugin because there are several plugins that handles the client side (for connecting to already secured APIs), but none for the API providers.

Secure API Grail Plugin provides the following Grails artefacts:

  • SecureApiService - A service that expose a single method isAuthorizeRequest to be used in your filters or interceptor before executing and API call.


Declare the plugin dependency in the BuildConfig.groovy file, as shown here:

grails.project.dependency.resolution = {
    inherits("global") { }
  	log "info"
		repositories {
				//your repositories
		dependencies {
				//your regular dependencies
		plugins {
				//here go your plugin dependencies
				runtime ':secureapi:1.2'


Add your clients pairs of key/secret in grails-app/conf/Config.groovy_:

[REQUIRED] = ["my_first_api_user": "the_secret_of_my_first_api_user", "my_second_api_user": "the_secret_of_my_second_api_user"]

Getting started with a demo app

If you want to quickly run the plugin on a demo app, you can download Secure Api Sample Implementation App and start it on port 80.

If you want to easily test the implementation using a GUI, you can download Secure API Simple Client App. This app can be used as sample client implementaion for your API users.


Project documentation is located here :

Latest releases

  • 2013-06-20 V1.2 : First public release
  • 2013-06-18 V1.1 : Non public release
  • 2013-06-03 V1.0 : Non public release


To report any bug, please use the project Issues section on GitHub.

Beta status

This is a beta release. The underlying APIs are generally stable, however we may make changes to the library in response to developer feedback.


The Secure API Grail Plugin is licensed under the Apache Licence, Version 2.0.