elvidapiclient

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteApiScope added in v1.4.0

func DeleteApiScope(elvidAuthority string, accessTokenAD string, apiScopeName string) diag.Diagnostics

func DeleteClientSecret

func DeleteClientSecret(elvidAuthority string, accessTokenAD string, clientId string, clientSecretId string) error

func DeleteMachineClient

func DeleteMachineClient(elvidAuthority string, accessTokenAD string, id string) error

func DeleteRequest

func DeleteRequest(url string, accessToken string) (*http.Response, error)

func DeleteUserClient

func DeleteUserClient(elvidAuthority string, accessTokenAD string, id string) error

func ElvidErrorResponse

func ElvidErrorResponse(response *http.Response, url string) error

func GetAccessTokenAD

func GetAccessTokenAD(tenantId string, clientId string, clientSecret string) (string, error)

func GetRequest

func GetRequest(url string, accessToken string) (*http.Response, error)

func PatchRequest

func PatchRequest(url string, accessToken string, jsonValue []byte) (*http.Response, error)

func PostRequest

func PostRequest(url string, accessToken string, jsonValue []byte) (*http.Response, error)

func UpdateUserClient

func UpdateUserClient(elvidAuthority string, accessTokenAD string, userClient *UserClient) error

Types

type ADResponse

type ADResponse struct {
	AccessToken string `json:"access_token"`
}

type ApiScope added in v1.4.0

type ApiScope struct {
	Name                string   `json:"Name"`
	Description         string   `json:"Description"`
	UserClaims          []string `json:"UserClaims"`
	AllowMachineClients bool     `json:"AllowMachineClients"`
	AllowUserClients    bool     `json:"AllowUserClients"`
}

func CreateOrUpdateApiScope added in v1.4.0

func CreateOrUpdateApiScope(elvidAuthority string, accessTokenAD string, apiScopeInput *ApiScope) (*ApiScope, diag.Diagnostics)

func ReadApiScope added in v1.4.0

func ReadApiScope(elvidAuthority string, accessTokenAD string, name string) (*ApiScope, diag.Diagnostics)

type ClientClaim added in v1.5.0

type ClientClaim struct {
	Type   string   `json:"Type"`
	Values []string `json:"Values"`
}

type ClientProperty added in v1.6.0

type ClientProperty struct {
	Type   string   `json:"Key"`
	Values []string `json:"Values"`
}

type ClientSecret

type ClientSecret struct {
	Id                    int    `json:"Id"`
	Value                 string `json:"SecretValue"`
	HashedValueStartsWith string `json:"HashedValueStartsWith"`
}

func CreateClientSecret

func CreateClientSecret(elvidAuthority string, accessTokenAD string, clientId string) (*ClientSecret, error)

func ReadClientSecret

func ReadClientSecret(elvidAuthority string, accessTokenAD string, clientId string, clientSecretId string) (*ClientSecret, error)

type MachineClient

type MachineClient struct {
	Id                   int           `json:"Id"`
	ClientId             string        `json:"ClientId"`
	ClientName           string        `json:"ClientName"`
	TestUserLoginEnabled bool          `json:"TestUserLoginEnabled"`
	IsDelegationClient   bool          `json:"IsDelegationClient"`
	AccessTokenLifeTime  int           `json:"AccessTokenLifeTime"`
	Scopes               []string      `json:"Scopes"`
	ClientClaims         []ClientClaim `json:"ClientClaims"`
}

func CreateMachineClient

func CreateMachineClient(elvidAuthority string, accessTokenAD string, machineClientInput *MachineClient) (*MachineClient, error)

func ReadMachineClient

func ReadMachineClient(elvidAuthority string, accessTokenAD string, id string) (*MachineClient, error)

func UpdateMachineClient

func UpdateMachineClient(elvidAuthority string, accessTokenAD string, machineClient *MachineClient) (*MachineClient, error)

type UserClient

type UserClient struct {
	Id                               int              `json:"Id"`
	ClientId                         string           `json:"ClientId"`
	ClientName                       string           `json:"ClientName"`
	Scopes                           []string         `json:"Scopes"`
	Domains                          []string         `json:"Domains"`
	RedirectUriPaths                 []string         `json:"RedirectUriPaths"`
	PostLogoutRedirectUriPaths       []string         `json:"PostLogoutRedirectUriPaths"`
	BankIDLoginEnabled               bool             `json:"BankIDLoginEnabled"`
	IdPortenLoginEnabled             bool             `json:"IdPortenLoginEnabled"`
	LocalLoginEnabled                bool             `json:"LocalLoginEnabled"`
	ElviaADLoginEnabled              bool             `json:"ElviaADLoginEnabled"`
	TestUserLoginEnabled             bool             `json:"TestUserLoginEnabled"`
	RequireClientSecret              bool             `json:"RequireClientSecret"`
	AccessTokenLifetime              int              `json:"AccessTokenLifetime"`
	AlwaysIncludeUserClaimsInIdToken bool             `json:"AlwaysIncludeUserClaimsInIdToken"`
	ClientNameLanguageKey            string           `json:"ClientNameLanguageKey"`
	AllowUseOfRefreshTokens          bool             `json:"AllowUseOfRefreshTokens"`
	OneTimeUsageForRefreshTokens     bool             `json:"OneTimeUsageForRefreshTokens"`
	RefreshTokensLifeTime            int              `json:"RefreshTokensLifeTime"`
	ClientProperties                 []ClientProperty `json:"ClientProperties"`
}

func CreateUserClient

func CreateUserClient(elvidAuthority string, accessTokenAD string, userClient *UserClient) (*UserClient, error)

func ReadUserClient

func ReadUserClient(elvidAuthority string, accessTokenAD string, id string) (*UserClient, error)

Jump to

Keyboard shortcuts

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