All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.officefloor.tutorial.jwtresourcehttpserver.SecuredResource Maven / Gradle / Ivy

package net.officefloor.tutorial.jwtresourcehttpserver;

import java.io.IOException;

import net.officefloor.server.http.ServerHttpConnection;
import net.officefloor.web.security.HttpAccess;

/**
 * Secured resource.
 * 
 * @author Daniel Sagenschneider
 */
// START SNIPPET: tutorial
public class SecuredResource {

	@HttpAccess(ifRole = "tutorial")
	public void secure(Claims claims, ServerHttpConnection connection) throws IOException {
		connection.getResponse().getEntityWriter().write("Hello " + claims.getId());
	}

}
// END SNIPPET: tutorial




© 2015 - 2025 Weber Informatics LLC | Privacy Policy