auth

Paddy 2014-09-01 Parent:75cf37088852 Child:88523dab00a5

29:5bf0a5fd1d01 Go to Latest

auth/memstore.go

Implement GrantStore for Memstore. Fix bug in GrantStore that asks for a UUID when it really wants a string. Implement GrantStore interface in Memstore, including unit tests for successful (i.e., works-as-intended) scenarios.

History
     1.1 --- a/memstore.go	Mon Sep 01 09:21:31 2014 -0400
     1.2 +++ b/memstore.go	Mon Sep 01 09:49:23 2014 -0400
     1.3 @@ -7,6 +7,9 @@
     1.4  	refreshTokenLookup map[string]string
     1.5  	profileTokenLookup map[string][]string
     1.6  	tokenLock          sync.RWMutex
     1.7 +
     1.8 +	grants    map[string]Grant
     1.9 +	grantLock sync.RWMutex
    1.10  }
    1.11  
    1.12  func NewMemstore() *Memstore {
    1.13 @@ -14,6 +17,7 @@
    1.14  		tokens:             map[string]Token{},
    1.15  		refreshTokenLookup: map[string]string{},
    1.16  		profileTokenLookup: map[string][]string{},
    1.17 +		grants:             map[string]Grant{},
    1.18  	}
    1.19  }
    1.20