clients

package
v1.1.151 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 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
	// contains filtered or unexported fields
}

func New

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

func (*Okta) ActivatePolicy added in v1.1.147

func (o *Okta) ActivatePolicy(authServerID, policyID string) error

ActivatePolicy activates an Okta authorization server policy. A 404 is treated as success.

func (*Okta) AssignClientToPolicy

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

No-ops if the policy already includes the client or is assigned to ALL_CLIENTS.

func (*Okta) AssignGroupToApp

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

AssignGroupToApp adds an Okta application to the given group.

func (*Okta) CreatePolicy added in v1.1.147

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

func (*Okta) CreatePolicyRule added in v1.1.147

func (o *Okta) CreatePolicyRule(authServerID, policyID, name, grantType, scope string) error

func (*Okta) DeactivateApp added in v1.1.147

func (o *Okta) DeactivateApp(appID string) error

DeactivateApp deactivates an Okta application. A 404 response is treated as success. DeactivateApp must be called before DeleteApp.

func (*Okta) DeactivatePolicy added in v1.1.147

func (o *Okta) DeactivatePolicy(authServerID, policyID string) error

DeactivatePolicy deactivates an Okta authorization server policy. A 404 is treated as success. DeactivatePolicy must be called before DeletePolicy.

func (*Okta) DeleteApp added in v1.1.147

func (o *Okta) DeleteApp(appID string) error

DeleteApp deletes an Okta application. A 404 response is treated as success. DeactivateApp must be called before this method.

func (*Okta) DeletePolicy added in v1.1.147

func (o *Okta) DeletePolicy(authServerID, policyID string) error

DeletePolicy deletes an Okta authorization server policy. A 404 is treated as success. DeactivatePolicy must be called before this method.

func (*Okta) FindGroupByName

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

FindGroupByName searches Okta for a group with the given name and returns its ID. Returns ("", nil) when no matching group exists.

func (*Okta) FindPolicyByName

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

Two-step: list to find the policy ID, then fetch the full object so callers can update it without an extra round-trip.

func (*Okta) PolicyHasRuleForScope added in v1.1.147

func (o *Okta) PolicyHasRuleForScope(authServerID, policyID, scope string) (bool, error)

PolicyHasRuleForScope reports whether the given Okta authorization server policy has at least one rule that grants the specified scope.

func (*Okta) RemoveClientFromPolicy added in v1.1.147

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

RemoveClientFromPolicy removes clientID from the policy's conditions.clients.include list and updates the policy via the Okta API. If the client is not present the call is a no-op. The caller is responsible for deleting the policy when the include list becomes empty.

func (*Okta) UnassignGroupFromApp

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

UnassignGroupFromApp removes an Okta application from the given group. A 404 response is treated as success (app or group already gone).

func (*Okta) UpdatePolicy

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

Jump to

Keyboard shortcuts

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