auth

Paddy 2015-05-17 Parent:581c60f8dd23 Child:0a2c3d677161

171:807d20a0b197 Go to Latest

auth/config.go

Add login verification to Config. Keep track of how we're going to verify logins using the Config struct.

History
     1.1 --- a/config.go	Sun May 17 02:17:09 2015 -0400
     1.2 +++ b/config.go	Sun May 17 02:18:07 2015 -0400
     1.3 @@ -11,22 +11,26 @@
     1.4  	ErrInvalidLoginURI = errors.New("invalid login URI")
     1.5  	// ErrConfigNotInitialized is returned when a Context is instantiated with a Config object that hasn't had its Init function called.
     1.6  	ErrConfigNotInitialized = errors.New("config not initialized")
     1.7 +
     1.8 +	// Version is used to keep track of what version of the build this is
     1.9 +	Version string
    1.10  )
    1.11  
    1.12  // Config holds the configuration values necessary to run a server. A Config
    1.13  // instance is the only way to instantiate a Context variable.
    1.14  type Config struct {
    1.15 -	ClientStore   clientStore
    1.16 -	AuthCodeStore authorizationCodeStore
    1.17 -	ProfileStore  profileStore
    1.18 -	TokenStore    tokenStore
    1.19 -	SessionStore  sessionStore
    1.20 -	ScopeStore    scopeStore
    1.21 -	Template      *template.Template
    1.22 -	LoginURI      string
    1.23 -	JWTPrivateKey []byte
    1.24 -	iterations    int
    1.25 -	secureCookie  bool
    1.26 +	ClientStore               clientStore
    1.27 +	AuthCodeStore             authorizationCodeStore
    1.28 +	ProfileStore              profileStore
    1.29 +	TokenStore                tokenStore
    1.30 +	SessionStore              sessionStore
    1.31 +	ScopeStore                scopeStore
    1.32 +	LoginVerificationNotifier loginVerificationNotifier
    1.33 +	Template                  *template.Template
    1.34 +	LoginURI                  string
    1.35 +	JWTPrivateKey             []byte
    1.36 +	iterations                int
    1.37 +	secureCookie              bool
    1.38  }
    1.39  
    1.40  // Init is a function that preps the Config object to be used for Context creation, setting variables