Documentation ¶
Index ¶
- Constants
- func AddRolesToGroup(ctx context.Context, client *clients.FronteggClient, groupId string, ...) error
- func AddUsersToGroup(ctx context.Context, client *clients.FronteggClient, groupId string, ...) error
- func ClearSSODefaultRoles(ctx context.Context, client *clients.FronteggClient, configID string) error
- func DeleteSCIM2Configuration(ctx context.Context, client *clients.FronteggClient, id string) error
- func DeleteSCIMGroup(ctx context.Context, client *clients.FronteggClient, groupID string) error
- func DeleteSSOConfiguration(ctx context.Context, client *clients.FronteggClient, configId string) error
- func DeleteSSODomain(ctx context.Context, client *clients.FronteggClient, configID, domainID string) error
- func DeleteSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ...) error
- func DeleteUser(ctx context.Context, client *clients.FronteggClient, userID string) error
- func FetchSSOConfigurationsRaw(ctx context.Context, client *clients.FronteggClient) ([]byte, error)
- func FlattenRoles(roles []ScimRole) []interface{}
- func FlattenSCIM2Configurations(configurations SCIM2ConfigurationsResponse) []interface{}
- func FlattenSSOConfigurations(configurations SSOConfigurationsResponse) []interface{}
- func FlattenScimGroups(groups []ScimGroup) []interface{}
- func FlattenUsers(users []ScimUser) []interface{}
- func GetAppPasswordApiEndpoint(client *clients.FronteggClient, resourcePath string, resourceID ...string) string
- func GetSSODefaultRoles(ctx context.Context, client *clients.FronteggClient, configID string) ([]string, error)
- func GetSSOGroupMappings(ctx context.Context, client *clients.FronteggClient, ssoConfigID string) (*[]GroupMapping, error)
- func ListSSORoles(ctx context.Context, client *clients.FronteggClient) (map[string]string, error)
- func RemoveRolesFromGroup(ctx context.Context, client *clients.FronteggClient, groupId string, ...) error
- func RemoveUsersFromGroup(ctx context.Context, client *clients.FronteggClient, groupId string, ...) error
- func SetSSODefaultRoles(ctx context.Context, client *clients.FronteggClient, configID string, ...) error
- func UpdateSCIMGroup(ctx context.Context, client *clients.FronteggClient, groupID string, ...) error
- type AddRolesToGroupParams
- type AppPasswordResponse
- type Domain
- type FronteggRole
- type FronteggRolesResponse
- type GroupCreateParams
- type GroupMapping
- func CreateSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ssoConfigID, group string, ...) (*GroupMapping, error)
- func FetchSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ...) (*GroupMapping, error)
- func UpdateSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ...) (*GroupMapping, error)
- type GroupUpdateParams
- type RoleIDs
- type SCIM2Configuration
- type SCIM2ConfigurationsResponse
- type SCIMGroupsResponse
- type SSOConfig
- type SSOConfigurationsResponse
- type ScimGroup
- func CreateSCIMGroup(ctx context.Context, client *clients.FronteggClient, params GroupCreateParams) (*ScimGroup, error)
- func FetchSCIMGroups(ctx context.Context, client *clients.FronteggClient) ([]ScimGroup, error)
- func GetSCIMGroupByID(ctx context.Context, client *clients.FronteggClient, groupID string) (*ScimGroup, error)
- type ScimRole
- type ScimUser
- type UserRequest
- type UserResponse
- type UserRole
Constants ¶
const ( SSORolesApiPathV1 = "/frontegg/team/resources/sso/v1/configurations/%s/roles" SSORolesApiPathV2 = "/identity/resources/roles/v2" )
const ( UsersApiPathV1 = "/identity/resources/users/v1" UsersApiPathV2 = "/identity/resources/users/v2" )
const (
ApiTokenPath = "/identity/resources/users/api-tokens/v1"
)
const (
SCIM2ConfigurationsApiPathV1 = "/frontegg/directory/resources/v1/configurations/scim2"
)
const (
SCIMGroupsApiPathV1 = "/frontegg/identity/resources/groups/v1"
)
const (
SSOConfigurationsApiPathV1 = "/frontegg/team/resources/sso/v1/configurations"
)
const (
SSODomainsApiPathV1 = "/frontegg/team/resources/sso/v1/configurations"
)
const (
SSOGroupMappingApiPathV1 = "/frontegg/team/resources/sso/v1/configurations"
)
Variables ¶
This section is empty.
Functions ¶
func AddRolesToGroup ¶ added in v0.6.10
func AddRolesToGroup(ctx context.Context, client *clients.FronteggClient, groupId string, roleIds []string) error
AddRolesToGroup adds roles to an existing group in Frontegg.
func AddUsersToGroup ¶ added in v0.6.10
func AddUsersToGroup(ctx context.Context, client *clients.FronteggClient, groupId string, userIds []string) error
AddUsersToGroup adds users to an existing group in Frontegg.
func ClearSSODefaultRoles ¶ added in v0.6.8
func ClearSSODefaultRoles(ctx context.Context, client *clients.FronteggClient, configID string) error
ClearSSODefaultRoles clears the default roles for an SSO configuration.
func DeleteSCIM2Configuration ¶ added in v0.6.9
DeleteSCIM2Configuration deletes an existing SCIM 2.0 configuration
func DeleteSCIMGroup ¶ added in v0.6.10
DeleteSCIMGroup deletes an existing group in Frontegg.
func DeleteSSOConfiguration ¶ added in v0.6.7
func DeleteSSOConfiguration(ctx context.Context, client *clients.FronteggClient, configId string) error
DeleteSSOConfiguration deletes an existing SSO configuration
func DeleteSSODomain ¶ added in v0.6.8
func DeleteSSODomain(ctx context.Context, client *clients.FronteggClient, configID, domainID string) error
DeleteSSODomain deletes a specific SSO domain.
func DeleteSSOGroupMapping ¶ added in v0.6.8
func DeleteSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ssoConfigID, groupID string) error
DeleteSSOGroupMapping deletes an existing SSO group role mapping.
func DeleteUser ¶ added in v0.6.6
DeleteUser deletes a user from Frontegg.
func FetchSSOConfigurationsRaw ¶ added in v0.6.9
FetchSSOConfigurationsRaw fetches the raw SSO configurations
func FlattenRoles ¶ added in v0.6.9
func FlattenRoles(roles []ScimRole) []interface{}
Helper function to flatten the roles data
func FlattenSCIM2Configurations ¶
func FlattenSCIM2Configurations(configurations SCIM2ConfigurationsResponse) []interface{}
Helper function to flatten the SCIM 2.0 configurations data
func FlattenSSOConfigurations ¶ added in v0.6.7
func FlattenSSOConfigurations(configurations SSOConfigurationsResponse) []interface{}
Helper function to flatten the SSO configurations data
func FlattenScimGroups ¶ added in v0.6.9
func FlattenScimGroups(groups []ScimGroup) []interface{}
Helper function to flatten the groups data
func FlattenUsers ¶ added in v0.6.9
func FlattenUsers(users []ScimUser) []interface{}
Helper function to flatten the users 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
func GetSSODefaultRoles ¶ added in v0.6.8
func GetSSODefaultRoles(ctx context.Context, client *clients.FronteggClient, configID string) ([]string, error)
GetSSODefaultRoles retrieves the default roles for an SSO configuration.
func GetSSOGroupMappings ¶ added in v0.6.8
func GetSSOGroupMappings(ctx context.Context, client *clients.FronteggClient, ssoConfigID string) (*[]GroupMapping, error)
GetSSOGroupMappings retrieves all SSO group role mappings for a specific SSO configuration.
func ListSSORoles ¶ added in v0.6.8
ListRoles fetches roles from the Frontegg API and returns a map of role names to their IDs.
func RemoveRolesFromGroup ¶ added in v0.6.10
func RemoveRolesFromGroup(ctx context.Context, client *clients.FronteggClient, groupId string, roleIds []string) error
RemoveRolesFromGroup removes roles from an existing group in Frontegg.
func RemoveUsersFromGroup ¶ added in v0.6.10
func RemoveUsersFromGroup(ctx context.Context, client *clients.FronteggClient, groupId string, userIds []string) error
RemoveUsersFromGroup removes users from an existing group in Frontegg.
func SetSSODefaultRoles ¶ added in v0.6.8
func SetSSODefaultRoles(ctx context.Context, client *clients.FronteggClient, configID string, roleIDs []string) error
SetSSODefaultRoles sets the default roles for an SSO configuration.
func UpdateSCIMGroup ¶ added in v0.6.10
func UpdateSCIMGroup(ctx context.Context, client *clients.FronteggClient, groupID string, params GroupUpdateParams) error
UpdateSCIMGroup updates an existing group in Frontegg.
Types ¶
type AddRolesToGroupParams ¶ added in v0.6.10
type AddRolesToGroupParams struct {
RoleIds []string `json:"roleIds"`
}
AddRolesToGroupParams represents the parameters for adding roles to a group.
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 Domain ¶ added in v0.6.7
type Domain struct { ID string `json:"id"` Domain string `json:"domain"` Validated bool `json:"validated"` SsoConfigId string `json:"ssoConfigId"` }
Domain represents the structure for SSO domain.
func CreateSSODomain ¶ added in v0.6.8
func CreateSSODomain(ctx context.Context, client *clients.FronteggClient, configID, domainName string) (*Domain, error)
CreateDomain creates a new SSO domain.
func FetchSSODomain ¶ added in v0.6.8
func FetchSSODomain(ctx context.Context, client *clients.FronteggClient, configID, domainName string) (*Domain, error)
FetchSSODomain fetches a specific SSO domain.
type FronteggRole ¶ added in v0.6.8
type FronteggRolesResponse ¶ added in v0.6.8
type FronteggRolesResponse struct { Items []FronteggRole `json:"items"` Metadata struct { TotalItems int `json:"totalItems"` TotalPages int `json:"totalPages"` } `json:"_metadata"` }
type GroupCreateParams ¶ added in v0.6.10
type GroupCreateParams struct { Name string `json:"name"` Description string `json:"description,omitempty"` Color string `json:"color,omitempty"` Metadata string `json:"metadata,omitempty"` }
GroupCreateParams represents the parameters for creating a new group.
type GroupMapping ¶ added in v0.6.8
type GroupMapping struct { ID string `json:"id"` Group string `json:"group"` Enabled bool `json:"enabled"` RoleIds []string `json:"roleIds"` SsoConfigId string `json:"-"` }
GroupMapping represents the structure for SSO group role mapping.
func CreateSSOGroupMapping ¶ added in v0.6.8
func CreateSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ssoConfigID, group string, roleIDs []string) (*GroupMapping, error)
CreateSSOGroupMapping creates a new SSO group role mapping.
func FetchSSOGroupMapping ¶ added in v0.6.8
func FetchSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ssoConfigID, groupID string) (*GroupMapping, error)
FetchSSOGroupMapping retrieves a specific SSO group role mapping.
func UpdateSSOGroupMapping ¶ added in v0.6.8
func UpdateSSOGroupMapping(ctx context.Context, client *clients.FronteggClient, ssoConfigID, groupID, group string, roleIDs []string) (*GroupMapping, error)
UpdateSSOGroupMapping updates an existing SSO group role mapping.
type GroupUpdateParams ¶ added in v0.6.10
type GroupUpdateParams struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Color string `json:"color,omitempty"` Metadata string `json:"metadata,omitempty"` }
GroupUpdateParams represents the parameters for updating an existing group.
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
func CreateSCIM2Configuration ¶ added in v0.6.9
func CreateSCIM2Configuration(ctx context.Context, client *clients.FronteggClient, config SCIM2Configuration) (*SCIM2Configuration, error)
CreateSCIM2Configuration creates a new SCIM 2.0 configuration
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 SCIMGroupsResponse ¶ added in v0.6.9
type SCIMGroupsResponse struct {
Groups []ScimGroup `json:"groups"`
}
SCIMGroupsResponse represents the overall structure of the response from the SCIM groups API.
type SSOConfig ¶ added in v0.6.7
type SSOConfig struct { Id string `json:"id"` Enabled bool `json:"enabled"` SsoEndpoint string `json:"ssoEndpoint"` PublicCertificate string `json:"publicCertificate"` SignRequest bool `json:"signRequest"` AcsUrl string `json:"acsUrl"` SpEntityId string `json:"spEntityId"` Type string `json:"type"` OidcClientId string `json:"oidcClientId"` OidcSecret string `json:"oidcSecret"` CreatedAt time.Time `json:"createdAt"` Domains []Domain }
SSOConfig represents the structure for SSO configuration.
func CreateSSOConfiguration ¶ added in v0.6.7
func CreateSSOConfiguration(ctx context.Context, client *clients.FronteggClient, ssoConfig SSOConfig) (*SSOConfig, error)
CreateSSOConfiguration creates a new SSO configuration
func UpdateSSOConfiguration ¶ added in v0.6.7
func UpdateSSOConfiguration(ctx context.Context, client *clients.FronteggClient, ssoConfig SSOConfig) (*SSOConfig, error)
UpdateSSOConfiguration updates an existing SSO configuration
type SSOConfigurationsResponse ¶ added in v0.6.7
type SSOConfigurationsResponse []SSOConfig
func FetchSSOConfigurations ¶ added in v0.6.7
func FetchSSOConfigurations(ctx context.Context, client *clients.FronteggClient) (SSOConfigurationsResponse, error)
FetchSSOConfigurations fetches the SSO configurations
type ScimGroup ¶ added in v0.6.9
type ScimGroup struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Metadata string `json:"metadata"` Roles []ScimRole `json:"roles"` Users []ScimUser `json:"users"` ManagedBy string `json:"managedBy"` }
ScimGroup represents the structure of a group in the response.
func CreateSCIMGroup ¶ added in v0.6.10
func CreateSCIMGroup(ctx context.Context, client *clients.FronteggClient, params GroupCreateParams) (*ScimGroup, error)
CreateSCIMGroup creates a new group in Frontegg.
func FetchSCIMGroups ¶ added in v0.6.9
FetchSCIMGroups fetches all SCIM groups.
func GetSCIMGroupByID ¶ added in v0.6.10
func GetSCIMGroupByID(ctx context.Context, client *clients.FronteggClient, groupID string) (*ScimGroup, error)
GetSCIMGroupByID fetches a single SCIM group by its ID.
type ScimRole ¶ added in v0.6.9
type ScimRole struct { ID string `json:"id"` Key string `json:"key"` Name string `json:"name"` Description string `json:"description"` IsDefault bool `json:"is_default"` }
ScimRole represents the structure of a role within a group.
type ScimUser ¶ added in v0.6.9
type ScimUser struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` }
ScimUser represents the structure of a user within a group.
type UserRequest ¶ added in v0.6.6
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"` Roles []UserRole `json:"roles"` }
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.