oktaapi

package
v0.0.0-...-ac47164 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Label string `json:"label,omitempty"`
}

type Group

type Group struct {
	ID                    string `json:"id"`
	LastUpdated           string `json:"lastUpdated"`
	LastMembershipUpdated string `json:"lastMembershipUpdated"`
	Type                  string `json:"type"`
	Profile               `json:"profile,omitempty"`
}

type GroupAssignmentResp

type GroupAssignmentResp struct {
	GroupID string `json:"id"`
	Name    string `json:"name,omitempty"`
	Profile `json:"profile,omitempty"`
}

type OktaAppService

type OktaAppService interface {
	ListApplications(ctx context.Context, qp *query.Params) ([]okta.App, *okta.Response, error)
	ListApplicationGroupAssignments(ctx context.Context, appID string, qp *query.Params) ([]*okta.ApplicationGroupAssignment, *okta.Response, error)
	GetApplication(ctx context.Context, appId string, appInstance okta.App, qp *query.Params) (okta.App, *okta.Response, error)
}

type OktaClient

type OktaClient struct {
	OktaAppService
	OktaGroupService
	Ctx context.Context
}

func NewClient

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

func (*OktaClient) GetAppById

func (oc *OktaClient) GetAppById(appID string) (App, error)

func (*OktaClient) GetGroupById

func (oc *OktaClient) GetGroupById(groupID string) (Group, error)

func (*OktaClient) ListApps

func (oc *OktaClient) ListApps(name string) ([]App, error)

func (*OktaClient) ListAppsGroups

func (oc *OktaClient) ListAppsGroups(appID string) (App, []GroupAssignmentResp, error)

func (*OktaClient) ListOktaGroupUsers

func (oc *OktaClient) ListOktaGroupUsers(groupID string) ([]User, error)

func (*OktaClient) ListOktaGroups

func (oc *OktaClient) ListOktaGroups(name string) ([]Group, error)

type OktaGroupService

type OktaGroupService interface {
	GetGroup(ctx context.Context, groupId string) (*okta.Group, *okta.Response, error)
	ListGroups(ctx context.Context, qp *query.Params) ([]*okta.Group, *okta.Response, error)
	ListGroupUsers(ctx context.Context, groupId string, qp *query.Params) ([]*okta.User, *okta.Response, error)
}

type Profile

type Profile struct {
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	SAMLRoles   []string `json:"samlRoles,omitempty"`
	Role        string   `json:"role,omitempty"`
	Email       string   `json:"email,omitempty"`
	FirstName   string   `json:"firstName,omitempty"`
	LastName    string   `json:"lastName,omitempty"`
}

type User

type User struct {
	ID      string `json:"id"`
	Profile `json:"profile,omitempty"`
}

Jump to

Keyboard shortcuts

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