io.fluxcapacitor.javaclient.tracking.handling.authentication.User Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Default Java client library for interfacing with Flux Capacitor.
package io.fluxcapacitor.javaclient.tracking.handling.authentication;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import java.security.Principal;
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
public interface User extends Principal {
ThreadLocal current = new ThreadLocal<>();
@SuppressWarnings("unchecked")
static U getCurrent() {
return (U) current.get();
}
boolean hasRole(String role);
}