storage

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwsUpdateSession

func AwsUpdateSession(userId, accessToken, refreshToken string, privateKey ed25519.PrivateKey, publicKey ed25519.PublicKey) (status bool)

Update session data to aws secrets manager: accessToken, refreshToken, publicKey, privateKey Filename to be updated as `userId` (provided by SxT)

func AwsWriteSession

func AwsWriteSession(userId, accessToken, refreshToken string, privateKey ed25519.PrivateKey, publicKey ed25519.PublicKey) (status bool)

Write session data to aws secrets manager: accessToken, refreshToken, publicKey, privateKey Filename to be stored as `userId` (provided by SxT)

func FileWriteSession

func FileWriteSession(userId, accessToken, refreshToken string, privateKey ed25519.PrivateKey, publicKey ed25519.PublicKey) (status bool)

Write session data to file: accessToken, refreshToken, publicKey, privateKey Note: This is for demo purposes only. To make a secure session, save the credentials in db or some other secure source

Types

type AwsSessionStruct

type AwsSessionStruct struct {
	AccessToken  string             `json:"accessToken"`
	RefreshToken string             `json:"refreshToken"`
	PrivateKey   ed25519.PrivateKey `json:"privateKey"`
	PublicKey    ed25519.PublicKey  `json:"publicKey"`
}

func AwsReadSession

func AwsReadSession(userId string) (sessionStruct AwsSessionStruct, status bool)

Read session data from aws secrets manager: accessToken, refreshToken, publicKey, privateKey Filename to be retrieved as `userId` (provided by SxT)

type FileSessionStruct

type FileSessionStruct struct {
	AccessToken  string             `json:"accessToken"`
	RefreshToken string             `json:"refreshToken"`
	PrivateKey   ed25519.PrivateKey `json:"privateKey"`
	PublicKey    ed25519.PublicKey  `json:"publicKey"`
}

func FileReadSession

func FileReadSession(userId string) (sessionStruct FileSessionStruct, status bool)

Read session data from file: accessToken, refreshToken, publicKey, privateKey Note: This is for demo purposes only. To make a secure session, save the credentials in db or some other secure source

Jump to

Keyboard shortcuts

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