Documentation
¶
Overview ¶
Package auth is a thin wrapper around the identity-provider SDK. All calls to the upstream SDK go through this package so that "no provider configured" guards can be added in one place later.
Index ¶
- func AddPermission(p *Permission) (bool, error)
- func AddTransaction(t *Transaction) (bool, string, error)
- func AddTransactionWithDryRun(t *Transaction, dryRun bool) (bool, string, error)
- func DeletePermission(p *Permission) (bool, error)
- func DeleteResourceWithTag(resource *Resource, tag string) (bool, error)
- func GetOAuthToken(code, state string) (*oauth2.Token, error)
- func InitConfig(...)
- func SendEmail(title, content, sender, receiver string) error
- func UpdatePermission(p *Permission) (bool, error)
- func UploadResource(user, tag, parent, fullFilePath string, fileBytes []byte) (string, string, error)
- type Application
- type Cert
- type Claims
- type Organization
- type Permission
- type Provider
- type Resource
- type Transaction
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPermission ¶
func AddPermission(p *Permission) (bool, error)
func AddTransaction ¶
func AddTransaction(t *Transaction) (bool, string, error)
func AddTransactionWithDryRun ¶
func AddTransactionWithDryRun(t *Transaction, dryRun bool) (bool, string, error)
func DeletePermission ¶
func DeletePermission(p *Permission) (bool, error)
func DeleteResourceWithTag ¶
func InitConfig ¶
func InitConfig(endpoint, clientId, clientSecret, jwtPublicKey, organization, application string)
InitConfig initialises the identity-provider SDK client.
func UpdatePermission ¶
func UpdatePermission(p *Permission) (bool, error)
Types ¶
type Application ¶
type Application = casdoorsdk.Application
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.
func GetApplication ¶
func GetApplication(name string) (*Application, error)
type Cert ¶
type Cert = casdoorsdk.Cert
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.
type Claims ¶
type Claims = casdoorsdk.Claims
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.
func ParseJwtToken ¶
type Organization ¶
type Organization = casdoorsdk.Organization
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.
func GetOrganization ¶
func GetOrganization(name string) (*Organization, error)
type Permission ¶
type Permission = casdoorsdk.Permission
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.
func GetPermission ¶
func GetPermission(name string) (*Permission, error)
func GetPermissions ¶
func GetPermissions() ([]*Permission, error)
type Provider ¶
type Provider = casdoorsdk.Provider
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.
func GetProviders ¶
type Resource ¶
type Resource = casdoorsdk.Resource
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.
func GetResources ¶
type Transaction ¶
type Transaction = casdoorsdk.Transaction
Type aliases — re-export all SDK types used across the codebase so that other packages only need to import this package, not casdoorsdk directly.