auth
auth/memstore.go
Added validation for clients, split endpoints out. Split endpoints out into their own type and added associated methods to the ClientStores, so now each client can have more than one redirect endpoint. Added unit testing for endpoint methods. Added validation code to validate client changes.
1.1 --- a/memstore.go Thu Sep 18 19:34:18 2014 -0400 1.2 +++ b/memstore.go Thu Sep 18 22:13:22 2014 -0400 1.3 @@ -19,6 +19,9 @@ 1.4 profileClientLookup map[string][]uuid.ID 1.5 clientLock sync.RWMutex 1.6 1.7 + endpoints map[string][]Endpoint 1.8 + endpointLock sync.RWMutex 1.9 + 1.10 profiles map[string]Profile 1.11 profileLock sync.RWMutex 1.12 } 1.13 @@ -31,6 +34,7 @@ 1.14 grants: map[string]Grant{}, 1.15 clients: map[string]Client{}, 1.16 profileClientLookup: map[string][]uuid.ID{}, 1.17 + endpoints: map[string][]Endpoint{}, 1.18 profiles: map[string]Profile{}, 1.19 } 1.20 }