auth

package
v1.783.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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

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 DeleteResourceWithTag(resource *Resource, tag string) (bool, error)

func GetOAuthToken

func GetOAuthToken(code, state string) (*oauth2.Token, error)

func InitConfig

func InitConfig(endpoint, clientId, clientSecret, jwtPublicKey, organization, application string)

InitConfig initialises the identity-provider SDK client.

func SendEmail

func SendEmail(title, content, sender, receiver string) error

func UpdatePermission

func UpdatePermission(p *Permission) (bool, error)

func UploadResource

func UploadResource(user, tag, parent, fullFilePath string, fileBytes []byte) (string, string, 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.

func GetCert

func GetCert(name string) (*Cert, error)

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

func ParseJwtToken(token string) (*Claims, error)

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

func GetProviders() ([]*Provider, error)

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

func GetResources(owner, application, field, value, sortField, sortOrder string) ([]*Resource, error)

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.

type User

type User = casdoorsdk.User

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 GetUser

func GetUser(name string) (*User, error)

func GetUsers

func GetUsers() ([]*User, error)

Jump to

Keyboard shortcuts

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