auth.authz.permissionstore package

public struct FileBasedPermissionStore

Represents the permission store

  • <FileBasedPermissionStore> isAuthorized(string username, string[] scopes) returns (boolean)

    Checks if the the user has sufficient permission to access a resource with the specified scope

    Parameter Name Data Type Description
    username string user name
    scopes string[] array of scope names

    Return Variable Data Type Description
    boolean boolean: true if authorized, else false
  • <FileBasedPermissionStore> readGroupsOfScope(string scopeName) returns (string)

    Reads groups for the given scopes

    Parameter Name Data Type Description
    scopeName string name of the scope

    Return Variable Data Type Description
    string string: comma separated groups specified for the scopename
  • <FileBasedPermissionStore> readGroupsOfUser(string username) returns (string)

    Reads the groups for a user

    Parameter Name Data Type Description
    username string

    Return Variable Data Type Description
    string string: comma separeted groups list, as specified in the userstore file
  • <FileBasedPermissionStore> FileBasedPermissionStore.<init>()

public struct PermissionStore

Represents the permission store. Any implementation of the Permission store should be struct-wise similar

  • <PermissionStore> isAuthorized(string username, string[] scopes) returns (boolean)

    Checks if the the user has sufficient permission to access a resource with the specified scope

    Parameter Name Data Type Description
    username string user name
    scopes string[] array of scope names

    Return Variable Data Type Description
    boolean boolean: true if authorized, else false
  • <PermissionStore> readGroupsOfScope(string scopeName) returns (string)

    Reads groups for the given scopes

    Parameter Name Data Type Description
    scopeName string name of the scope

    Return Variable Data Type Description
    string string: comma separated groups specified for the scopename
  • <PermissionStore> readGroupsOfUser(string username) returns (string)

    Reads the groups for a user

    Parameter Name Data Type Description
    username string

    Return Variable Data Type Description
    string string: comma separeted groups list, as specified in the userstore file
  • <PermissionStore> PermissionStore.<init>()