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

org.dhatim.dropwizard.jwt.cookie.authentication.CurrentPrincipal Maven / Gradle / Ivy

There is a newer version: 5.1.3
Show newest version
package org.dhatim.dropwizard.jwt.cookie.authentication;

import java.security.Principal;

public class CurrentPrincipal {

    private static final ThreadLocal THREAD_LOCAL = new ThreadLocal<>();

    protected static void set(Principal principal){
        THREAD_LOCAL.set(principal);
    }

    protected static void remove(){
        THREAD_LOCAL.remove();
    }

    public static 

P get() { return (P)THREAD_LOCAL.get(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy