authentication

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 8 Imported by: 5

Documentation

Overview

Copyright 2024 BeyondTrust. All rights reserved. Package client implements functions to call Beyondtrust Secret Safe API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationObj

type AuthenticationObj struct {
	ApiUrl     url.URL
	ApiVersion string

	HttpClient         utils.HttpClientObj
	ExponentialBackOff *backoff.ExponentialBackOff
	// contains filtered or unexported fields
}

AuthenticationObj responsbile for authentication request data.

func Authenticate

func Authenticate(authenticationParametersObj AuthenticationParametersObj) (*AuthenticationObj, error)

Authenticate is responsible for Auth configuration using Client Id and Client secret. Prerequisites - use input validation methods before using this class.

func AuthenticateUsingApiKey added in v0.7.0

func AuthenticateUsingApiKey(authenticationParametersObj AuthenticationParametersObj) (*AuthenticationObj, error)

AuthenticateUsingApiKey is responsible for Auth configuration using API Key. Prerequisites - use input validation methods before using this class.

func (*AuthenticationObj) GetPasswordSafeAuthentication

func (authenticationObj *AuthenticationObj) GetPasswordSafeAuthentication() (entities.SignApinResponse, error)

GetPasswordSafeAuthentication is responsible for getting a token and signing in.

func (*AuthenticationObj) GetToken

func (authenticationObj *AuthenticationObj) GetToken(endpointUrl string, clientId string, clientSecret string) (string, error)

GetToken is responsible for getting a token from the PS API.

func (*AuthenticationObj) SignAppin

func (authenticationObj *AuthenticationObj) SignAppin(endpointUrl string, accessToken string, apiKey string) (entities.SignApinResponse, error)

SignAppin is responsible for creating a PS API session.

func (*AuthenticationObj) SignOut

func (authenticationObj *AuthenticationObj) SignOut() error

SignOut is responsible for closing the PS API session and cleaning up idle connections. Warn: should only be called one time for all data sources. The session is closed server side automatically after 20 minutes of uninterupted inactivity.

type AuthenticationParametersObj added in v0.14.0

type AuthenticationParametersObj struct {
	HTTPClient                 utils.HttpClientObj
	BackoffDefinition          *backoff.ExponentialBackOff
	EndpointURL                string
	APIVersion                 string
	ClientID                   string
	ClientSecret               string
	ApiKey                     string
	Logger                     logging.Logger
	RetryMaxElapsedTimeSeconds int
}

Jump to

Keyboard shortcuts

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