Documentation ¶
Overview ¶
Package lms provides common interfaces for different authentication methods for a Learning Management System.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationMethods ¶
type AuthorizationMethods struct {
Token TokenAuthorization
}
AuthorizationMethods contains possible authorization methods supported by a service's implementation. Fields that are not nil are supported.
type Host ¶
type Host string
Host describes the hostname of a LMS service. It is specifically used as a unique identifier among services.
type Name ¶
Name describes a name. If either First or Last is provided, then it is assumed that the field will contain the whole name (excluding Preferred).
type Service ¶
type Service interface {
Authorize() AuthorizationMethods
}
Service describes an LMS service.
type Session ¶
type Session interface { // User returns the current user. User() (*User, error) // Courses returns the list of courses that the current user is enrolled in. Courses() ([]Course, error) }
Session describes an authorized session.
type TokenAuthorization ¶
TokenAuthorization is an authorization method which uses direct tokens.