v0.2.2 Latest Latest

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 13 Imported by: 0




View Source
const MaximumRetryWaitTimeInSeconds = 15 * time.Minute
View Source
const RetryWaitTimeInSeconds = 30 * time.Second


This section is empty.


func NewHTTPSignature

func NewHTTPSignature(key string) (map[string]string, error)


type Okta

type Okta struct {
	APIKey       string
	HostURL      string
	OrgID        string
	RetryMaximum int
	RestClient   *resty.Client

func (*Okta) AddAppMember

func (o *Okta) AddAppMember(appId string, userId string, role string, roles []string) (*OktaUser, error)

func (*Okta) CreateApplication

func (o *Okta) CreateApplication(application OktaApplicationContents) (*OktaApplication, error)

func (*Okta) CreateAwsApplication

func (o *Okta) CreateAwsApplication(name string, providerArn string) (*OktaApplication, error)

func (*Okta) DeactivateApplication

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

func (*Okta) DeleteApplication

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

func (*Okta) GetAppMember

func (o *Okta) GetAppMember(appId string, userId string) (*OktaUser, error)

func (*Okta) GetApplication

func (o *Okta) GetApplication(appID string) (*OktaApplication, error)

func (*Okta) GetRestClient

func (okta *Okta) GetRestClient() *resty.Client

func (*Okta) GetSAMLMetadata

func (o *Okta) GetSAMLMetadata(appID string, keyID string) (string, error)

func (*Okta) GetUserIDByEmail

func (o *Okta) GetUserIDByEmail(user string, domain string) (string, error)

func (*Okta) ListAppMembers

func (o *Okta) ListAppMembers(appId string) ([]OktaUser, error)

func (*Okta) RemoveAppMember

func (o *Okta) RemoveAppMember(appId string, userId string) error

func (*Okta) SetRestClient

func (okta *Okta) SetRestClient(rest *resty.Client)

func (*Okta) UpdateApplication

func (o *Okta) UpdateApplication(application OktaApplicationContents) (*OktaApplication, error)

func (*Okta) UpdateAwsApplication

func (o *Okta) UpdateAwsApplication(appId string, name string, providerArn string) (*OktaApplication, error)

type OktaApplication

type OktaApplication struct {
	Credentials struct {
		Signing struct {
			KeyID string `json:"kid,omitempty"`
		} `json:"signing,omitempty"`
	} `json:"credentials,omitempty"`

type OktaApplicationAppSettings

type OktaApplicationAppSettings struct {
	AwsEnvironmentType  string `json:"awsEnvironmentType,omitempty"`
	GroupFilter         string `json:"groupFilter,omitempty"`
	LoginURL            string `json:"loginUrl,omitempty"`
	JoinAllRoles        bool   `json:"joinAllRoles,omitempty"`
	SessionDuration     int    `json:"sessionDuration,omitempty"`
	RoleValuePattern    string `json:"roleValuePattern,omitempty"`
	IdentityProviderArn string `json:"identityProviderArn,omitempty"`

type OktaApplicationContents

type OktaApplicationContents struct {
	ID         string                  `json:"id"`
	Name       string                  `json:"name"`
	Label      string                  `json:"label"`
	Features   []string                `json:"features"`
	SignOnMode string                  `json:"signOnMode"`
	Settings   OktaApplicationSettings `json:"settings,omitempty"`

type OktaApplicationSettings

type OktaApplicationSettings struct {
	App OktaApplicationAppSettings `json:"app,omitempty"`

type OktaAuthResponse

type OktaAuthResponse struct {
	ExpiresAt    time.Time `json:"expiresAt"`
	SessionToken string    `json:"sessionToken"`
	StateToken   string    `json:"stateToken"`
	Status       string    `json:"status"`

type OktaUser

type OktaUser struct {
	ID              string     `json:"id"`
	Status          string     `json:"status"`
	Created         *time.Time `json:"created,omitempty"`
	Activated       *time.Time `json:"activated,omitempty"`
	StatusChanged   *time.Time `json:"statusChanged,omitempty"`
	LastLogin       *time.Time `json:"lastLogin,omitempty"`
	LastUpdated     *time.Time `json:"lastUpdated,omitempty"`
	PasswordChanged *time.Time `json:"passwordChanged,omitempty"`
	Profile         struct {
		Login       string   `json:"login,omitempty"`
		FirstName   string   `json:"firstName,omitempty"`
		LastName    string   `json:"lastName,omitempty"`
		NickName    string   `json:"nickName,omitempty"`
		DisplayName string   `json:"displayName,omitempty"`
		Email       string   `json:"email,omitempty"`
		SecondEmail string   `json:"secondEmail,omitempty"`
		Role        string   `json:"role,omitempty"`
		SamlRoles   []string `json:"samlRoles,omitempty"`
	} `json:"profile,omitempty"`

type OktaWebClient

type OktaWebClient struct {
	HostURL  string
	AdminURL string
	UserName string
	Password string
	OrgID    string

func (*OktaWebClient) RevokeAWSProvisioning

func (o *OktaWebClient) RevokeAWSProvisioning(appID string) error

func (*OktaWebClient) SetAWSProvisioning

func (o *OktaWebClient) SetAWSProvisioning(appID string, accessKey string, secretKey string) error

Jump to

Keyboard shortcuts

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