Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthDatabase = "local" KeyPairFileName = "keyMacaroon.json" )
Variables ¶
This section is empty.
Functions ¶
func ValidationCaveatDate ¶
Types ¶
type IMacaroonSecurity ¶
type IMacaroonSecurity interface { CreateRequest(requestValidator MacaroonRequest) (*bakery.Macaroon, error) ReadResource(jsonData []byte) ([]bakery.Op, []string, error) ModifyMaroon(jsonData []byte) ([]byte, error) }
func Initialize ¶
func Initialize(mongoURI string) IMacaroonSecurity
type MacaroonCaveatRequest ¶
type MacaroonRequest ¶
type MacaroonRequest struct { Sender string Ressources []ResourceRequest }
type MacaroonSecurityService ¶
func (*MacaroonSecurityService) CreateRequest ¶
func (mss *MacaroonSecurityService) CreateRequest(requestValidator MacaroonRequest) (*bakery.Macaroon, error)
CreateRequest create a Macaroon from the given MacaroonRequest
func (*MacaroonSecurityService) ModifyMaroon ¶
func (mss *MacaroonSecurityService) ModifyMaroon(jsonData []byte) ([]byte, error)
func (*MacaroonSecurityService) ReadResource ¶
ReadResource parse the Json Base64 encoded, check the Macaroon, and return the Op inside
type ResourceRequest ¶
Click to show internal directories.
Click to hide internal directories.