~rogpeppe/goose/state-of-the-world

« back to all changes in this revision

Viewing changes to identity/identity.go

  • Committer: Ian Booth
  • Date: 2012-11-21 07:56:19 UTC
  • Revision ID: ian.booth@canonical.com-20121121075619-4fh6i9yq6fj6cwct
Extract identity functionality from client, and also extract common HTTP methods

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
        "os"
5
5
)
6
6
 
 
7
const (
 
8
        AUTH_LEGACY = iota
 
9
        AUTH_USERPASS
 
10
)
 
11
 
7
12
type AuthDetails struct {
8
 
        Token       string
 
13
        TokenId     string
 
14
        TenantId    string
 
15
        UserId      string
9
16
        ServiceURLs map[string]string
10
17
}
11
18
 
18
25
}
19
26
 
20
27
type Authenticator interface {
21
 
        Auth(creds Credentials) (*AuthDetails, error)
 
28
        Auth(creds *Credentials) (*AuthDetails, error)
22
29
}
23
30
 
24
31
func getConfig(envVars ...string) (value string) {