Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct { Base *models.Configuration `json:"base,omitempty"` NgcSession string `json:"ngc_session,omitempty"` }
Credentials stores third-party credentials
func FindCredentials ¶
func FindCredentials(username string) *Credentials
FindCredentials returns creds from local DB
func (*Credentials) ToSession ¶
func (c *Credentials) ToSession() *Session
ToSession translate credentials to session
type Principal ¶
type Principal struct {
Username string
}
Principal principal
func RequestToPrincipal ¶
RequestToPrincipal returns principal from token string in the request 'Authorization' header
type Session ¶
type Session struct { DockerUsername string `json:"docker_username,omitempty"` DockerPassword string `json:"-"` NgcEmail string `json:"ngc_email,omitempty"` NgcPassword string `json:"-"` NgcApikey string `json:"-"` NgcSession string `json:"-"` K8sConfig string `json:"-"` RescaleKey string `json:"-"` }
Session defines JWT payload
func RetrieveSession ¶
RetrieveSession retrieves the session itself from a HTTP request
Click to show internal directories.
Click to hide internal directories.