org.dhatim.dropwizard.jwt.cookie.authentication.CurrentPrincipal Maven / Gradle / Ivy
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