Documentation ¶
Index ¶
- Constants
- func Can(db *gorm.DB, identity uid.PolymorphicID, privilege, resource string) (bool, error)
- func CreateAccessKey(c *gin.Context, accessKey *models.AccessKey, identityID uid.ID) (body string, err error)
- func CreateCredential(c *gin.Context, user models.Identity) (string, error)
- func CreateDestination(c *gin.Context, destination *models.Destination) error
- func CreateGrant(c *gin.Context, grant *models.Grant) error
- func CreateGroup(c *gin.Context, group *models.Group) error
- func CreateIdentity(c *gin.Context, identity *models.Identity) error
- func CreateProvider(c *gin.Context, provider *models.Provider) error
- func CreateToken(c *gin.Context) (token *models.Token, err error)
- func CurrentIdentity(c *gin.Context) *models.Identity
- func CurrentIdentityProvider(c *gin.Context) (*models.Provider, error)
- func DeleteAccessKey(c *gin.Context, id uid.ID) error
- func DeleteAllIdentityAccessKeys(c *gin.Context) error
- func DeleteDestination(c *gin.Context, id uid.ID) error
- func DeleteGrant(c *gin.Context, id uid.ID) error
- func DeleteIdentity(c *gin.Context, id uid.ID) error
- func DeleteProvider(c *gin.Context, id uid.ID) error
- func DeleteRequestAccessKey(c *gin.Context) error
- func ExchangeAccessKey(c *gin.Context, requestingAccessKey string, expiry time.Time) (string, *models.Identity, error)
- func ExchangeAuthCodeForAccessKey(c *gin.Context, code string, provider *models.Provider, oidc authn.OIDC, ...) (*models.Identity, string, error)
- func GetDestination(c *gin.Context, id uid.ID) (*models.Destination, error)
- func GetGrant(c *gin.Context, id uid.ID) (*models.Grant, error)
- func GetGroup(c *gin.Context, id uid.ID) (*models.Group, error)
- func GetIdentity(c *gin.Context, id uid.ID) (*models.Identity, error)
- func GetProvider(c *gin.Context, id uid.ID) (*models.Provider, error)
- func ListAccessKeys(c *gin.Context, identityID uid.ID, name string) ([]models.AccessKey, error)
- func ListDestinations(c *gin.Context, uniqueID, name string) ([]models.Destination, error)
- func ListGrants(c *gin.Context, subject uid.PolymorphicID, resource string, privilege string) ([]models.Grant, error)
- func ListGroupGrants(c *gin.Context, groupID uid.ID) ([]models.Grant, error)
- func ListGroups(c *gin.Context, name string, providerID uid.ID) ([]models.Group, error)
- func ListIdentities(c *gin.Context, email string, providerID uid.ID) ([]models.Identity, error)
- func ListIdentityGrants(c *gin.Context, identityID uid.ID) ([]models.Grant, error)
- func ListIdentityGroups(c *gin.Context, userID uid.ID) ([]models.Group, error)
- func ListProviders(c *gin.Context, name string) ([]models.Provider, error)
- func LoginWithUserCredential(c *gin.Context, email, password string, expiry time.Time) (string, *models.Identity, bool, error)
- func RequireInfraRole(c *gin.Context, oneOfRoles ...string) (*gorm.DB, error)
- func RetrieveUserProviderTokens(c *gin.Context) (*models.ProviderToken, error)
- func SaveDestination(c *gin.Context, destination *models.Destination) error
- func SaveProvider(c *gin.Context, provider *models.Provider) error
- func Setup(c *gin.Context) (string, *models.AccessKey, error)
- func SetupRequired(c *gin.Context) (bool, error)
- func UpdateCredential(c *gin.Context, user *models.Identity, newPassword string) error
- func UpdateProviderToken(c *gin.Context, providerToken *models.ProviderToken) error
- func UpdateUserInfo(c *gin.Context, info *authn.UserInfo, user *models.Identity, ...) error
Constants ¶
View Source
const ResourceInfraAPI = "infra"
Variables ¶
This section is empty.
Functions ¶
func Can ¶ added in v0.5.9
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 CreateCredential ¶ added in v0.6.0
func CreateDestination ¶
func CreateDestination(c *gin.Context, destination *models.Destination) error
func CreateIdentity ¶ added in v0.9.0
func CreateToken ¶ added in v0.9.0
func CurrentIdentityProvider ¶ added in v0.6.1
CurrentIdentityProvider returns the provider for the current identity in the request context
func DeleteAllIdentityAccessKeys ¶ added in v0.9.0
func DeleteRequestAccessKey ¶ added in v0.5.9
func ExchangeAccessKey ¶ added in v0.5.9
func ExchangeAccessKey(c *gin.Context, requestingAccessKey string, expiry time.Time) (string, *models.Identity, error)
ExchangeAccessKey allows a key exchange to get a new key with a shorter lifetime
func ExchangeAuthCodeForAccessKey ¶ added in v0.5.4
func GetDestination ¶
func GetIdentity ¶ added in v0.9.0
func ListAccessKeys ¶ added in v0.5.4
func ListDestinations ¶
func ListGrants ¶
func ListGroups ¶
func ListIdentities ¶ added in v0.9.0
func ListIdentityGrants ¶ added in v0.9.0
func ListIdentityGroups ¶ added in v0.9.0
func LoginWithUserCredential ¶ added in v0.6.0
func RequireInfraRole ¶ added in v0.8.0
RequireInfraRole checks that the identity in the context can perform an action on a resource based on their granted roles
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 UpdateCredential ¶ added in v0.6.0
func UpdateProviderToken ¶
func UpdateProviderToken(c *gin.Context, providerToken *models.ProviderToken) error
UpdateProviderToken overwrites an existing set of provider tokens
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.