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

ec.gob.senescyt.sniese.commons.security.PrincipalProviderImpl Maven / Gradle / Ivy

There is a newer version: 2.0.5
Show newest version
package ec.gob.senescyt.sniese.commons.security;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

public class PrincipalProviderImpl implements PrincipalProvider {
    @Override
    public Subject obtenerUsuarioAutenticado()  {
        return SecurityUtils.getSubject();
    }

    @Override
    public Usuario obtenerUsuario() {
        return (Usuario) SecurityUtils.getSubject().getPrincipal();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy