access

package
v0.5.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Can added in v0.5.9

func Can(db *gorm.DB, identity uid.PolymorphicID, privilege, resource string) (bool, error)

Can checks if an identity has a privilege that means it can perform an action on a resource

func CreateAccessKey added in v0.5.4

func CreateAccessKey(c *gin.Context, accessKey *models.AccessKey, machineID uid.ID) (body string, err error)

func CreateDestination

func CreateDestination(c *gin.Context, destination *models.Destination) error

func CreateGrant

func CreateGrant(c *gin.Context, grant *models.Grant) error

func CreateGroup

func CreateGroup(c *gin.Context, group *models.Group) error

func CreateMachine added in v0.5.4

func CreateMachine(c *gin.Context, machine *models.Machine) error

func CreateMachineToken added in v0.5.8

func CreateMachineToken(c *gin.Context) (token *models.Token, err error)

func CreateProvider

func CreateProvider(c *gin.Context, provider *models.Provider) error

func CreateUser

func CreateUser(c *gin.Context, user *models.User) error

func CreateUserToken

func CreateUserToken(c *gin.Context) (token *models.Token, err error)

func CurrentMachine added in v0.5.8

func CurrentMachine(c *gin.Context) *models.Machine

func CurrentUser

func CurrentUser(c *gin.Context) *models.User

func DeleteAccessKey added in v0.5.4

func DeleteAccessKey(c *gin.Context, id uid.ID) error

func DeleteAllUserAccessKeys added in v0.5.4

func DeleteAllUserAccessKeys(c *gin.Context) error

func DeleteDestination

func DeleteDestination(c *gin.Context, id uid.ID) error

func DeleteGrant

func DeleteGrant(c *gin.Context, id uid.ID) error

func DeleteMachine added in v0.5.4

func DeleteMachine(c *gin.Context, id uid.ID) error

func DeleteProvider

func DeleteProvider(c *gin.Context, id uid.ID) error

func DeleteRequestAccessKey added in v0.5.9

func DeleteRequestAccessKey(c *gin.Context) error

func ExchangeAccessKey added in v0.5.9

func ExchangeAccessKey(c *gin.Context, requestingAccessKey string, expiry time.Time) (string, *models.Machine, error)

ExchangeAccessKey allows a key exchange to get a new key with a shorter lifetime

func ExchangeAuthCodeForAccessKey added in v0.5.4

func ExchangeAuthCodeForAccessKey(c *gin.Context, code string, provider *models.Provider, oidc authn.OIDC, sessionDuration time.Duration, redirectURL string) (*models.User, string, error)

func GetDestination

func GetDestination(c *gin.Context, id uid.ID) (*models.Destination, error)

func GetGrant

func GetGrant(c *gin.Context, id uid.ID) (*models.Grant, error)

func GetGroup

func GetGroup(c *gin.Context, id uid.ID) (*models.Group, error)

func GetMachine added in v0.5.8

func GetMachine(c *gin.Context, id uid.ID) (*models.Machine, error)

func GetProvider

func GetProvider(c *gin.Context, id uid.ID) (*models.Provider, error)

func GetUser

func GetUser(c *gin.Context, id uid.ID) (*models.User, error)

func ListAccessKeys added in v0.5.4

func ListAccessKeys(c *gin.Context, machineID uid.ID, name string) ([]models.AccessKey, error)

func ListDestinations

func ListDestinations(c *gin.Context, uniqueID, name string) ([]models.Destination, error)

func ListGrants

func ListGrants(c *gin.Context, identity uid.PolymorphicID, resource string, privilege string) ([]models.Grant, error)

func ListGroupGrants

func ListGroupGrants(c *gin.Context, groupID uid.ID) ([]models.Grant, error)

func ListGroups

func ListGroups(c *gin.Context, name string, providerID uid.ID) ([]models.Group, error)

func ListMachineGrants added in v0.5.8

func ListMachineGrants(c *gin.Context, machineID uid.ID) ([]models.Grant, error)

func ListMachines added in v0.5.4

func ListMachines(c *gin.Context, name string) ([]models.Machine, error)

func ListProviders

func ListProviders(c *gin.Context, name string) ([]models.Provider, error)

func ListUserGrants

func ListUserGrants(c *gin.Context, userID uid.ID) ([]models.Grant, error)

func ListUserGroups

func ListUserGroups(c *gin.Context, userID uid.ID) ([]models.Group, error)

func ListUsers

func ListUsers(c *gin.Context, email string, providerID uid.ID) ([]models.User, error)

func RetrieveUserProviderTokens

func RetrieveUserProviderTokens(c *gin.Context) (*models.ProviderToken, error)

RetrieveUserProviderTokens gets the provider tokens that the current session token was created for

func SaveDestination

func SaveDestination(c *gin.Context, destination *models.Destination) error

func SaveProvider

func SaveProvider(c *gin.Context, provider *models.Provider) error

func Setup added in v0.5.9

func Setup(c *gin.Context) (string, *models.AccessKey, error)

func SetupRequired added in v0.5.9

func SetupRequired(c *gin.Context) (bool, error)

func UpdateProviderToken

func UpdateProviderToken(c *gin.Context, providerToken *models.ProviderToken) error

UpdateProviderToken overwrites an existing set of provider tokens

func UpdateUserInfo

func UpdateUserInfo(c *gin.Context, info *authn.UserInfo, user *models.User, provider *models.Provider) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL