Documentation ¶
Overview ¶
Package access contains function to validate token and parse access from a valid token
for write operations (i.e., create and update).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAccess ¶
This function takes input of a string of token and a string of organization's name. It checks whether the given token in valid and whether it contains access for write operation to *orgName*. If not, an error is returned.
func GetAccessField ¶
func ParseAccess ¶
ParseAccess takes input of a token string. It first validates whether the token is valid using firebase, then parses from the token's claims a list organization names to which that the token owner has write access. If token is invalid, an error is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.