apps

package
v1.1.20 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AuthMethodPassword int32 = iota
	AuthMethodOpenID
	AuthMethodSAML
	AuthMethodAPI
	AuthMethodGoogle

	AuthMethodForemsBasedApp
	AuthMethodWSFED
	AuthMethodOpenIDConnect
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID                 *int32                   `json:"id,omitempty"`
	Name               *string                  `json:"name,omitempty"`
	Visible            *bool                    `json:"visible,omitempty"`
	Description        *string                  `json:"description,omitempty"`
	Notes              *string                  `json:"notes,omitempty"`
	IconURL            *string                  `json:"icon_url,omitempty"`
	AuthMethod         *int32                   `json:"auth_method,omitempty"`
	PolicyID           *int32                   `json:"policy_id,omitempty"`
	AllowAssumedSignin *bool                    `json:"allow_assumed_signin,omitempty"`
	TabID              *int32                   `json:"tab_id,omitempty"`
	BrandID            *int32                   `json:"brand_id,omitempty"`
	ConnectorID        *int32                   `json:"connector_id,omitempty"`
	CreatedAt          *time.Time               `json:"created_at,omitempty"`
	UpdatedAt          *time.Time               `json:"updated_at,omitempty"`
	Provisioning       *AppProvisioning         `json:"provisioning"`
	Sso                *AppSso                  `json:"sso"`
	Configuration      *AppConfiguration        `json:"configuration"`
	Parameters         map[string]AppParameters `json:"parameters"`
	RoleIDs            []int                    `json:"role_ids"`
}

App is the contract for apps api v2.

type AppConfiguration

type AppConfiguration struct {
	RedirectURI                   *string `json:"redirect_uri,omitempty"`
	RefreshTokenExpirationMinutes *int32  `json:"refresh_token_expiration_minutes,omitempty"`
	LoginURL                      *string `json:"login_url,omitempty"`
	OidcApplicationType           *int32  `json:"oidc_application_type,omitempty"`
	TokenEndpointAuthMethod       *int32  `json:"token_endpoint_auth_method,omitempty"`
	AccessTokenExpirationMinutes  *int32  `json:"access_token_expiration_minutes,omitempty"`
	ProviderArn                   *string `json:"provider_arn,omitempty"`
	IdpList                       *string `json:"idp_list,omitempty"`
	SignatureAlgorithm            *string `json:"signature_algorithm,omitempty"`

	LogoutURL                    *string `json:"logout_url,omitempty"`
	PostLogoutRedirectURI        *string `json:"post_logout_redirect_uri,omitempty"`
	Audience                     *string `json:"audience,omitempty"`
	ConsumerURL                  *string `json:"consumer_url,omitempty"`
	Login                        *string `json:"login,omitempty"`
	Recipient                    *string `json:"recipient,omitempty"`
	Validator                    *string `json:"validator,omitempty"`
	RelayState                   *string `json:"relaystate,omitempty"`
	Relay                        *string `json:"relay,omitempty"`
	SAMLNotValidOnOrAafter       *string `json:"saml_notonorafter,omitempty"`
	GenerateAttributeValueTags   *string `json:"generate_attribute_value_tags,omitempty"`
	SAMLInitiaterID              *string `json:"saml_initiater_id,omitempty"`
	SAMLNotValidBefore           *string `json:"saml_notbefore,omitempty"`
	SAMLIssuerType               *string `json:"saml_issuer_type,omitempty"`
	SAMLSignElement              *string `json:"saml_sign_element,omitempty"`
	EncryptAssertion             *string `json:"encrypt_assertion,omitempty"`
	SAMLSessionNotValidOnOrAfter *string `json:"saml_sessionnotonorafter,omitempty"`
	SAMLEncryptionMethodID       *string `json:"saml_encryption_method_id,omitempty"`
	SAMLNameIDFormatID           *string `json:"saml_nameid_format_id,omitempty"`
}

AppConfiguration is the contract for configuration.

type AppParameters

type AppParameters struct {
	ID                        *int32  `json:"id,omitempty"`
	Label                     *string `json:"label,omitempty"`
	UserAttributeMappings     *string `json:"user_attribute_mappings,omitempty"`
	UserAttributeMacros       *string `json:"user_attribute_macros,omitempty"`
	AttributesTransformations *string `json:"attributes_transformations,omitempty"`
	SkipIfBlank               *bool   `json:"skip_if_blank,omitempty"`
	Values                    *string `json:"values,omitempty,omitempty"`
	DefaultValues             *string `json:"default_values,omitempty"`
	ParamKeyName              *string `json:"param_key_name,omitempty"`
	ProvisionedEntitlements   *bool   `json:"provisioned_entitlements,omitempty"`
	SafeEntitlementsEnabled   *bool   `json:"safe_entitlements_enabled,omitempty"`
	IncludeInSamlAssertion    *bool   `json:"include_in_saml_assertion,omitempty"`
}

AppParameters is the contract for parameters.

type AppProvisioning

type AppProvisioning struct {
	Enabled *bool `json:"enabled,omitempty"`
}

AppProvisioning is the contract for provisioning.

type AppSso

type AppSso struct {
	ClientID     *string            `json:"client_id,omitempty"`
	ClientSecret *string            `json:"client_secret,omitempty"`
	MetadataURL  *string            `json:"metadata_url,omitempty"`
	AcsURL       *string            `json:"acs_url,omitempty"`
	SlsURL       *string            `json:"sls_url,omitempty"`
	Issuer       *string            `json:"issuer,omitempty"`
	Certificate  *AppSsoCertificate `json:"certificate"`
}

AppSso is the contract for apps sso.

type AppSsoCertificate

type AppSsoCertificate struct {
	ID    *int32  `json:"id,omitempty"`
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

AppSsoCertificate is the contract for sso certificate.

type AppUser added in v1.1.20

type AppUser struct {
	ID        *int32  `json:"id,omitempty"`
	Firstname *string `json:"firstname,omitempty"`
	Lastname  *string `json:"lastname,omitempty"`
	Username  *string `json:"username,omitempty"`
	Email     *string `json:"email,omitempty"`
}

AppUser is the contract for users of an app.

type AppsQuery

type AppsQuery struct {
	Limit       string
	Page        string
	Name        string
	ConnectorID string
	AuthMethod  string
	Cursor      string
}

type V2Service

type V2Service struct {
	Endpoint, ErrorContext string
	Repository             services.Repository
}

V2Service holds the information needed to interface with a repository

func New

func New(repo services.Repository, host string) *V2Service

New creates the new svc service v2.

func (*V2Service) Create

func (svc *V2Service) Create(app *App) error

Create creates a new app, and if successful, it returns a pointer to the app.

func (*V2Service) Destroy

func (svc *V2Service) Destroy(id int32) error

Destroy deletes the app for the id, and if successful, it returns nil

func (*V2Service) GetOne

func (svc *V2Service) GetOne(id int32) (*App, error)

GetOne retrieves the app by id, and if successful, it returns a pointer to the app.

func (*V2Service) GetUsers added in v1.1.20

func (svc *V2Service) GetUsers(id int32) ([]AppUser, error)

GetUsers retrieves the list of users for a given app by id, it returns an array of users for the app.

func (*V2Service) Query

func (svc *V2Service) Query(query *AppsQuery) ([]App, error)

Query retrieves all the apps from the repository that meet the query criteria passed in the request payload. If an empty payload is given, it will retrieve all apps.

func (*V2Service) Update

func (svc *V2Service) Update(app *App) (*App, error)

Update is unique in that the API does not fully support Parameters as first-class resources and are managed by nesting them in the App. This means that a partial update state could exist if, for example, a parameter failed to delete or be updated while other parameter changes succeeded. In order to ensure the client is given an accurate representation of what has been persisted to the API, we call out to the GetOne to simply return what is currently in the API, rather than updating in place. This is a temporary holdover until parameters is dealt with in a consistent fashion to other nested resources like app rules

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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