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

com.cleverpine.viravaspringhelper.core.ViravaAuthority Maven / Gradle / Ivy

There is a newer version: 3.1.6
Show newest version
package com.cleverpine.viravaspringhelper.core;

import com.cleverpine.viravaspringhelper.dto.ScopeType;
import org.springframework.security.core.GrantedAuthority;

public class ViravaAuthority implements GrantedAuthority {

    private final String authority;

    ViravaAuthority(BaseResource resource, ScopeType scope) {
        this.authority = String.format("%s_%s", resource.resource(), scope.scope()).toUpperCase();
    }

    @Override
    public String getAuthority() {
        return authority;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy