Documentation ¶
Index ¶
Constants ¶
View Source
const OsiamProviderName = "osiam"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OsiamBackend ¶
type OsiamBackend struct {
// contains filtered or unexported fields
}
func NewOsiamBackend ¶
func NewOsiamBackend(endpoint, clientId, clientSecret string) (*OsiamBackend, error)
NewOsiamBackend creates a new OSIAM Backend and verifies the parameters.
func (*OsiamBackend) Authenticate ¶
type OsiamError ¶
func ParseOsiamError ¶
func ParseOsiamError(jsonBody []byte) OsiamError
func (OsiamError) IsLoginError ¶
func (e OsiamError) IsLoginError() bool
func (OsiamError) IsUnauthorized ¶
func (e OsiamError) IsUnauthorized() bool
type Token ¶
type Token struct { TokenType string `json:"token_type"` // example "bearer" AccessToken string `json:"access_token"` // example "79f479c2-c0d7-458a-8464-7eb887dbc943" RefreshToken string `json:"refresh_token"` // example "3c7c4a87-dc91-4dd0-8ec8-d229a237a47c" ClientId string `json:"client_id"` // example "example-client" UserName string `json:"user_name"` // example "admin" Userid string `json:"user_id"` // example "84f6cffa-4505-48ec-a851-424160892283" Scope string `json:"scope"` // example "ME" RefreshTokenExpiresAt Timestamp `json:"refresh_token_expires_at"` // example 1479309001813 ExpiresAt Timestamp `json:"expires_at"` // example 1479251401814 ExpiresIn int `json:"expires_in"` // example 28795 }
Token represents an osiam auth token
Click to show internal directories.
Click to hide internal directories.