Authorization.AbstractClientType

Required fields:

  • id::String;
  • id2permission::Dict{String, Permission}; # Resource ID => Permission
  • idpattern2permission::Dict{Regex, Permission}; # Resource ID pattern => Permission
  • type2permission::Dict{DataType, Permission}; # Resource type => Permission
Authorization.create!Method

Create resource. If successful return nothing, else return an error message as a String.

Authorization.getpermissionMethod

Returns the Permission object for client-resource combination if it exists, else returns nothing.

Authorization.haspermissionMethod

Returns true if the client has permission to act on the resource according to the given action.

Action ust be one of :create, :read, :update, :delete.

Authorization.update!Method

Update resource. If successful return nothing, else return an error message as a String.

Base.delete!Method

Delete resource. If successful return nothing, else return an error message as a String.

Base.readMethod

Read resource. If successful return (true, value), else return (false, errormessage::String).