Documentation
¶
Index ¶
- func ConvertX25519Key(ed25519_sk []byte) [32]byte
- func GetEncryptedConfigName() (string, error)
- func GetEncryptedContents() (string, error)
- func GetPassword() ([]byte, error)
- func ResetPassword() error
- func SaveConfigContents(config *OSDFConfig) error
- func SaveConfigContents_internal(config *OSDFConfig, forcePassword bool) error
- func SaveEncryptedContents(encContents []byte) error
- func SavePassword([]byte) error
- func TryGetPassword() ([]byte, error)
- type OSDFConfig
- type OauthIssuer
- type PrefixEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertX25519Key ¶
func GetEncryptedConfigName ¶
func GetEncryptedContents ¶
func GetPassword ¶
func ResetPassword ¶
func ResetPassword() error
func SaveConfigContents ¶
func SaveConfigContents(config *OSDFConfig) error
func SaveConfigContents_internal ¶
func SaveConfigContents_internal(config *OSDFConfig, forcePassword bool) error
func SaveEncryptedContents ¶
func SavePassword ¶
func TryGetPassword ¶
Types ¶
type OSDFConfig ¶
type OSDFConfig struct { // Top-level OSDF object OSDF struct { // List of OAuth2 client configurations OauthClient []PrefixEntry `yaml:"oauth_client,omitempty"` } `yaml:"OSDF"` }
func GetConfigContents ¶
func GetConfigContents() (OSDFConfig, error)
type OauthIssuer ¶
type OauthIssuer struct { Issuer string `json:"issuer"` DeviceAuthEndpoint string `json:"device_authorization_endpoint"` GrantTypes []string `json:"grant_types_supported"` }
func GetIssuerMetadata ¶
func GetIssuerMetadata(issuer_url string) (*OauthIssuer, error)
type PrefixEntry ¶
type PrefixEntry struct { // OSDF namespace prefix Prefix string `yaml:"prefix"` ClientID string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` Tokens struct { Expiration int64 `yaml:"expiration"` AccessToken string `yaml:"access_token"` RefreshToken string `yaml:"refresh_token,omitempty"` } `yaml:"tokens,omitempty"` }
Click to show internal directories.
Click to hide internal directories.