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

io.fluxcapacitor.javaclient.tracking.handling.authentication.User Maven / Gradle / Ivy

There is a newer version: 0.1015.0
Show newest version
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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy