net.officefloor.tutorial.jwthttpserver.SecuredResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JwtHttpServer Show documentation
Show all versions of JwtHttpServer Show documentation
Tutorial of implementing JWT
The newest version!
package net.officefloor.tutorial.jwthttpserver;
import java.io.IOException;
import net.officefloor.server.http.ServerHttpConnection;
import net.officefloor.web.security.HttpAccess;
/**
* Secured resource.
*
* @author Daniel Sagenschneider
*/
public class SecuredResource {
@HttpAccess(ifRole = "tutorial")
public void secure(ServerHttpConnection connection) throws IOException {
connection.getResponse().getEntityWriter().write("Hello JWT secured World");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy