Skip to content

Instantly share code, notes, and snippets.

@sebastienblanc
Created April 15, 2013 11:50
Show Gist options
  • Save sebastienblanc/5387537 to your computer and use it in GitHub Desktop.
Save sebastienblanc/5387537 to your computer and use it in GitHub Desktop.
{
"security":
	"createUsers" :["sebi","abtractj"],                   //1
	"createRole" :["simple","admin"],                     //2
	"roleMap": ["simple":["abstractj","sebi"],"admin":["sebi"]], //3
 	"generateLoginForm" : true,                           //4
 	"generateOTPPage" : true,                             //5
	"entities" : {                                        //6
		"org.sebi.Task" : {
			"GET": {
				"authentification" : false
			 },
			"POST": {
				"authentification" : true,
				"authorization" : "simple"
			},
			"PUT": {
				"authentification" : true,
				"authorization" : "admin"
			},
			"DELETE": {
				"authentification" : true,
				"authorization" : "admin"
			}
		}
	}
}

Let me detail each of these points to make the discussion easier :

route().from("/task").roles("admin").on(RequestMethod.DELETE).to(Task.class).delete();

      - On the frontend, setting the flag or not on a pipe to enable auth. Other option are possible, liking hiding links, disabling button depending on the authorization/authnetification. We should discuss these options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment