Documentation
¶
Index ¶
- func AwsUpdateSession(userId, accessToken, refreshToken string, privateKey ed25519.PrivateKey, ...) (status bool)
- func AwsWriteSession(userId, accessToken, refreshToken string, privateKey ed25519.PrivateKey, ...) (status bool)
- func FileWriteSession(userId, accessToken, refreshToken string, privateKey ed25519.PrivateKey, ...) (status bool)
- type AwsSessionStruct
- type FileSessionStruct
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