Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler() http_boundary.Handler
Types ¶
type AuthResult ¶
type AuthResult struct {
UserId string
}
Result of parsing the authentication token
This struct might be just in/out struct for GetToken/Parse
type Authenticator ¶
type Authenticator interface { // Returns authentication token for given user // // When expiation time is null it will be set with default value. GetToken(userId string, expirationTime *time.Time) (string, error) Parse(string) (*AuthResult, error) }
Implementations are responsible for providing authentication tokens and verifying tokens from user.
func NewAuthenticator ¶
func NewAuthenticator() Authenticator
type LoginResponse ¶
type LoginResponse struct { Token string `json:"token"` *http_boundary.Response }
type Service ¶
type Service interface {
Login(string, string) (string, *http_boundary.ApiError)
}
func NewService ¶
func NewService() Service
Click to show internal directories.
Click to hide internal directories.