authentication

package
v0.10.6-beta Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 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

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

AuthenticationObj responsbile for authentication request data.

func Authenticate

func Authenticate(httpClient utils.HttpClientObj, backoffDefinition *backoff.ExponentialBackOff, endpointUrl string, clientId string, clientSecret string, logger logging.Logger, retryMaxElapsedTimeSeconds int) (*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(httpClient utils.HttpClientObj, backoffDefinition *backoff.ExponentialBackOff, endpointUrl string, logger logging.Logger, retryMaxElapsedTimeSeconds int, apiKey string) (*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.

Jump to

Keyboard shortcuts

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