oktaapi

package
v0.0.0-...-e8e8979 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientWrapper

type ClientWrapper struct {
	// contains filtered or unexported fields
}

ClientWrapper is a wrapper around github.com/okta/okta-sdk-golang/v2/okta Client type. The purpose of this package is to act as a simplified client for the Okta API. The methods expected to be used for that client are defined in the Client interface in pkg/usersearch.

func NewClient

func NewClient(url string, token string) (*ClientWrapper, error)

NewClient creates a Client

func (*ClientWrapper) FetchUserInfo

func (cw *ClientWrapper) FetchUserInfo(ctx context.Context, username string) (*models.UserInfo, error)

FetchUserInfo fetches a single user from Okta by EUA ID

func (*ClientWrapper) FetchUserInfoByCommonName

func (cw *ClientWrapper) FetchUserInfoByCommonName(ctx context.Context, commonName string) (*models.UserInfo, error)

FetchUserInfoByCommonName fetches a single user from Okta by commonName It will error if no users are found, and will also error if there are more than one result for that user It is possible that users would share a name, but other functions must be used for to return the array.

func (*ClientWrapper) FetchUserInfos

func (cw *ClientWrapper) FetchUserInfos(ctx context.Context, usernames []string) ([]*models.UserInfo, error)

FetchUserInfos fetches users from Okta by EUA ID

func (*ClientWrapper) SearchCommonNameContains

func (cw *ClientWrapper) SearchCommonNameContains(ctx context.Context, searchTerm string) ([]*models.UserInfo, error)

SearchCommonNameContains searches for a user by their First/Last name in Okta

func (*ClientWrapper) SearchCommonNameContainsExhaustive

func (cw *ClientWrapper) SearchCommonNameContainsExhaustive(ctx context.Context, searchTerm string) ([]*models.UserInfo, error)

SearchCommonNameContainsExhaustive searches for a user by their First/Last name in Okta. It doesn't validate if a user is currently active, which allows us to search for users no longer at CMS

Jump to

Keyboard shortcuts

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