frontegg

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UsersApiPathV1 = "/identity/resources/users/v1"
	UsersApiPathV2 = "/identity/resources/users/v2"
)
View Source
const (
	ApiTokenPath = "/identity/resources/users/api-tokens/v1"
)

Variables

This section is empty.

Functions

func DeleteUser added in v0.6.6

func DeleteUser(ctx context.Context, client *clients.FronteggClient, userID string) error

DeleteUser deletes a user from Frontegg.

func FlattenSCIM2Configurations

func FlattenSCIM2Configurations(configurations SCIM2ConfigurationsResponse) []interface{}

Helper function to flatten the SCIM 2.0 configurations data

func GetAppPasswordApiEndpoint added in v0.6.6

func GetAppPasswordApiEndpoint(client *clients.FronteggClient, resourcePath string, resourceID ...string) string

Helper function to construct the full API endpoint for app passwords

Types

type AppPasswordResponse added in v0.6.6

type AppPasswordResponse struct {
	ClientID    string    `json:"clientId"`
	Description string    `json:"description"`
	Owner       string    `json:"owner"`
	CreatedAt   time.Time `json:"created_at"`
	Secret      string    `json:"secret"`
}

func ListAppPasswords added in v0.6.6

func ListAppPasswords(ctx context.Context, client *clients.FronteggClient) ([]AppPasswordResponse, error)

ListAppPasswords fetches a list of app passwords from the API.

type SCIM2Configuration

type SCIM2Configuration struct {
	ID                   string    `json:"id"`
	Source               string    `json:"source"`
	TenantID             string    `json:"tenantId"`
	ConnectionName       string    `json:"connectionName"`
	SyncToUserManagement bool      `json:"syncToUserManagement"`
	CreatedAt            time.Time `json:"createdAt"`
	Token                string    `json:"token"`
}

SCIM 2.0 Configurations API response

type SCIM2ConfigurationsResponse

type SCIM2ConfigurationsResponse []SCIM2Configuration

func FetchSCIM2Configurations

func FetchSCIM2Configurations(ctx context.Context, client *clients.FronteggClient) (SCIM2ConfigurationsResponse, error)

FetchSCIM2Configurations fetches the SCIM 2.0 configurations

type UserRequest added in v0.6.6

type UserRequest struct {
	Email   string   `json:"email"`
	RoleIDs []string `json:"roleIds"`
}

UserRequest represents the request payload for creating or updating a user.

type UserResponse added in v0.6.6

type UserResponse struct {
	ID                string `json:"id"`
	Email             string `json:"email"`
	ProfilePictureURL string `json:"profilePictureUrl"`
	Verified          bool   `json:"verified"`
	Metadata          string `json:"metadata"`
	Provider          string `json:"provider"`
}

UserResponse represents the structure of a user response from Frontegg APIs.

func CreateUser added in v0.6.6

func CreateUser(ctx context.Context, client *clients.FronteggClient, userRequest UserRequest) (UserResponse, error)

CreateUser creates a new user in Frontegg.

func ReadUser added in v0.6.6

func ReadUser(ctx context.Context, client *clients.FronteggClient, userID string) (UserResponse, error)

ReadUser retrieves a user's details from Frontegg.

Jump to

Keyboard shortcuts

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