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

com.authkit.servlet.AuthKitRequestWrapper Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package com.authkit.servlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.security.Principal;

public class AuthKitRequestWrapper extends HttpServletRequestWrapper {

    private final Principal userPrincipal;

    /**
     * Constructs a request object wrapping the given request.
     *
     * @param request
     * @throws IllegalArgumentException if the request is null
     */
    public AuthKitRequestWrapper(HttpServletRequest request, Principal userPrincipal) {
        super(request);
        this.userPrincipal = userPrincipal;
    }

    @Override
    public Principal getUserPrincipal() {
        return userPrincipal;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy