clients

package
v1.1.136 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const OktaAuthHeaderPrefix = "SSWS"

Variables

This section is empty.

Functions

This section is empty.

Types

type Okta

type Okta struct {
	BaseURL  string
	APIToken string
	Client   coreapi.Client
}

Okta wraps Okta Management API calls.

func New

func New(apiClient coreapi.Client, baseURL, apiToken string) *Okta

func (*Okta) AssignClientToPolicy

func (o *Okta) AssignClientToPolicy(authServerID string, policy map[string]interface{}, clientID string) error

AssignClientToPolicy updates the policy-level "Assigned to clients" list to include the given client. If the policy is already assigned to ALL_CLIENTS or already includes the client, it no-ops.

The policy map is modified in-place and then persisted via UpdatePolicy.

func (*Okta) AssignGroupToApp

func (o *Okta) AssignGroupToApp(appID, groupID string) error

func (*Okta) FindGroupByName

func (o *Okta) FindGroupByName(groupName string) (string, error)

func (*Okta) FindPolicyByName

func (o *Okta) FindPolicyByName(authServerID, policyName string) (map[string]interface{}, error)

FindPolicyByName returns the policy object for the given policy name on the authorization server. Returns nil if not found.

Note: This does a list call to locate the policy ID and then retrieves the policy by ID so callers can update it without needing an additional fetch.

func (*Okta) UnassignGroupFromApp

func (o *Okta) UnassignGroupFromApp(appID, groupID string) error

func (*Okta) UpdatePolicy

func (o *Okta) UpdatePolicy(authServerID, policyID string, policy map[string]interface{}) error

UpdatePolicy updates an existing authorization server policy.

Jump to

Keyboard shortcuts

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