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

io.polyapi.plugin.model.specification.function.AuthFunctionSpecification Maven / Gradle / Ivy

There is a newer version: 0.15.3
Show newest version
package io.polyapi.plugin.model.specification.function;

import io.polyapi.plugin.model.visitor.PolySpecificationVisitor;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class AuthFunctionSpecification extends FunctionSpecification {
    private String subResource;

    public boolean isAudienceRequired() {
        return getFunction().getArguments().stream().anyMatch(argument -> argument.getName().equals("audience"));
    }

    @Override
    public void accept(PolySpecificationVisitor visitor) {
        visitor.visit(this);
    }

    @Override
    protected String getSpecificationSubtype() {
        return "auth";
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy