PHP Interface Imbo\Auth\AccessControl\Adapter\MutableAdapterInterface

Author: Espen Hovlandsdal ([email protected])
Inheritance: extends Imbo\Auth\AccessControl\Adapter\AdapterInterface
显示文件 Open project: imbo/imbo

Public Methods

Method Description
addAccessRule ( string $publicKey, array $accessRule ) : string Add a new access rule to the given public key
addKeyPair ( string $publicKey, string $privateKey ) : boolean Add a new public/private key pair
addResourceGroup ( string $groupName, array $resources = [] ) : boolean Add a new group containing the given resources
deleteAccessRule ( string $publicKey, string $accessId ) : boolean Delete an access rule
deletePublicKey ( string $publicKey ) : boolean Delete a public key
deleteResourceGroup ( string $groupName ) : boolean Delete a resource group
updatePrivateKey ( string $publicKey, string $privateKey ) : boolean Update the private key for a public key
updateResourceGroup ( string $groupName, array $resources ) Update resources for an existing resource group

Method Details

addAccessRule() public method

Add a new access rule to the given public key
public addAccessRule ( string $publicKey, array $accessRule ) : string
$publicKey string Public key to add access rule to
$accessRule array Access rule definition
return string Returns a generated access ID

addKeyPair() public method

Add a new public/private key pair
public addKeyPair ( string $publicKey, string $privateKey ) : boolean
$publicKey string Public key to add
$privateKey string Corresponding private key
return boolean

addResourceGroup() public method

Add a new group containing the given resources
public addResourceGroup ( string $groupName, array $resources = [] ) : boolean
$groupName string Group name
$resources array Array of resources (eg. 'image.get', 'user.head' etc)
return boolean

deleteAccessRule() public method

Delete an access rule
public deleteAccessRule ( string $publicKey, string $accessId ) : boolean
$publicKey string Public key the access rule belongs to
$accessId string Access ID of the rule
return boolean

deletePublicKey() public method

Delete a public key
public deletePublicKey ( string $publicKey ) : boolean
$publicKey string Public key to delete
return boolean

deleteResourceGroup() public method

Delete a resource group
public deleteResourceGroup ( string $groupName ) : boolean
$groupName string Group name of the group to delete
return boolean

updatePrivateKey() public method

Update the private key for a public key
public updatePrivateKey ( string $publicKey, string $privateKey ) : boolean
$publicKey string Public key to update
$privateKey string Private key to set
return boolean

updateResourceGroup() public method

Update resources for an existing resource group
public updateResourceGroup ( string $groupName, array $resources )
$groupName string Group to add resources to
$resources array Array of resources (eg. 'image.get', 'user.head' etc)