Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package ec.gob.senescyt.sniese.commons.tests.helpers;
 
import static com.google.common.collect.Sets.newHashSet;
import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
public class ShiroRealmMock extends AuthorizingRealm {
    @Override
    public boolean supports(AuthenticationToken authenticationToken) {
        return authenticationToken instanceof BearerToken;
    }
    
    @Override
        return new SimpleAuthorizationInfo(newHashSet());
    }
    @Override
        Usuario usuarioAutenticado = new UsuarioAutenticado(randomAlphabetic(10), randomAlphabetic(10));
        return new SimpleAuthenticationInfo(usuarioAutenticadotoken.getCredentials(), getName());
    }
New to GrepCode? Check out our FAQ X