login.go
changeset 89 8a7a33bec6e1
parent 85 abf0f5e40281
child 107 f0db7634e540
equal deleted inserted replaced
88:df00ec8423fe 89:8a7a33bec6e1
    12 	CreatedAt    int    `json:"created_at"`
    12 	CreatedAt    int    `json:"created_at"`
    13 	Scope        string `json:"scope"`
    13 	Scope        string `json:"scope"`
    14 	TokenType    string `json:"token_type"`
    14 	TokenType    string `json:"token_type"`
    15 }
    15 }
    16 
    16 
    17 func (g *Client) Login(username, password string) error {
    17 func (g *Client) LoginBasic(username, password string) error {
    18 	if username == "" {
    18 	if username == "" {
    19 		return fmt.Errorf("missing username")
    19 		return fmt.Errorf("missing username")
    20 	}
    20 	}
    21 	if password == "" {
    21 	if password == "" {
    22 		return fmt.Errorf("missing password")
    22 		return fmt.Errorf("missing password")