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

co.pablob.security.commons.boundary.JwtPrincipalProvider Maven / Gradle / Ivy

The newest version!
package co.pablob.security.commons.boundary;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.security.enterprise.SecurityContext;

import co.pablob.security.commons.entity.JwtPrincipal;

@ApplicationScoped
public class JwtPrincipalProvider {

    @Inject
    @SuppressWarnings("CdiInjectionPointsInspection")
    private SecurityContext securityContext;

    public JwtPrincipal produceJwtPrincipal(){
        return (JwtPrincipal) securityContext.getCallerPrincipal();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy