Documentation
¶
Index ¶
- Constants
- type Okta
- func (o *Okta) ActivatePolicy(authServerID, policyID string) error
- func (o *Okta) AssignClientToPolicy(authServerID string, policy map[string]interface{}, clientID string) error
- func (o *Okta) AssignGroupToApp(appID, groupID string) error
- func (o *Okta) CreatePolicy(authServerID, name string, clientID string) (map[string]interface{}, error)
- func (o *Okta) CreatePolicyRule(authServerID, policyID, name, grantType, scope string) error
- func (o *Okta) DeactivateApp(appID string) error
- func (o *Okta) DeactivatePolicy(authServerID, policyID string) error
- func (o *Okta) DeleteApp(appID string) error
- func (o *Okta) DeletePolicy(authServerID, policyID string) error
- func (o *Okta) FindGroupByName(groupName string) (string, error)
- func (o *Okta) FindPolicyByName(authServerID, policyName string) (map[string]interface{}, error)
- func (o *Okta) PolicyHasRuleForScope(authServerID, policyID, scope string) (bool, error)
- func (o *Okta) RemoveClientFromPolicy(authServerID string, policy map[string]interface{}, clientID string) error
- func (o *Okta) UnassignGroupFromApp(appID, groupID string) error
- func (o *Okta) UpdatePolicy(authServerID, policyID string, policy map[string]interface{}) error
Constants ¶
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 (*Okta) ActivatePolicy ¶ added in v1.1.147
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 ¶
AssignGroupToApp adds an Okta application to the given group.
func (*Okta) CreatePolicy ¶ added in v1.1.147
func (*Okta) CreatePolicyRule ¶ added in v1.1.147
func (*Okta) DeactivateApp ¶ added in v1.1.147
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
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
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
DeletePolicy deletes an Okta authorization server policy. A 404 is treated as success. DeactivatePolicy must be called before this method.
func (*Okta) FindGroupByName ¶
FindGroupByName searches Okta for a group with the given name and returns its ID. Returns ("", nil) when no matching group exists.
func (*Okta) FindPolicyByName ¶
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
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 ¶
UnassignGroupFromApp removes an Okta application from the given group. A 404 response is treated as success (app or group already gone).