Skip to content

Instantly share code, notes, and snippets.

View paulkmoore's full-sized avatar

Paul K Moore paulkmoore

View GitHub Profile
@paulkmoore
paulkmoore / AuthorizationInterceptor.java
Last active August 29, 2015 13:56
Interceptor registration
package com.example.security;
import com.exmaple.model.User;
import com.example.providers.CurrentUser;
import com.example.service.authz.Permission;
import javax.annotation.security.DenyAll;
import javax.annotation.security.PermitAll;
import javax.inject.Inject;
import javax.interceptor.AroundInvoke;
@paulkmoore
paulkmoore / TestServlet.java
Created February 14, 2014 08:41
ServletSecurityInfo investigation
package com.example.resource;
import javax.servlet.ServletException;
import javax.servlet.annotation.HttpConstraint;
import javax.servlet.annotation.ServletSecurity;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.core.Response;
@paulkmoore
paulkmoore / JASPICallbackHandler.java
Created February 11, 2014 17:03
Proposed changes to CallerPrincipalCallback handling
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
@paulkmoore
paulkmoore / HttpServletRequestImpl.java
Created January 30, 2014 10:51
Proposal for isSecure() implementation
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0