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

org.bitbucket.fermenter.stout.authz.NoOpAttributePoint Maven / Gradle / Ivy

Go to download

Provides base functionality and patterns for utilizing Authzforce to provide core authorization needs.

There is a newer version: 2.7.0
Show newest version
package org.bitbucket.fermenter.stout.authz;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * To bootstrap the attributes, we need a default attribute point.  There isn't a real case to use this outside of that.
 */
public class NoOpAttributePoint implements StoutAttributePoint {

    private static final Logger logger = LoggerFactory.getLogger(NoOpAttributePoint.class);

    @Override
    public Collection> getValueForAttribute(String attributeId, String subject) {
        logger.error("The {} attribute provider should not be used - it is for bootstrap configuration purposes only!",
                NoOpAttributePoint.class);
        List> attributes = new ArrayList<>();
        attributes.add(new AttributeValue(attributeId, "DO NOT USE THIS!"));
        return attributes;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy