auth

Paddy 2014-12-14 Parent:5bccbed6631b Child:bc77a315f823

101:e98d19699ee9 Go to Latest

auth/request.go

Add config init function to calculate passphrase iterations. Create a config.Init function that should be called on program startup. It calculates the number of iterations the passphrase encryption should use.

History
1 package auth
3 const (
4 requestErrAccessDenied = "access_denied"
5 requestErrInsufficient = "insufficient"
6 requestErrOverflow = "overflow"
7 requestErrInvalidValue = "invalid_value"
8 requestErrInvalidFormat = "invalid_format"
9 requestErrMissing = "missing"
10 requestErrNotFound = "not_found"
11 requestErrConflig = "conflict"
12 requestErrActOfGod = "act_of_god"
13 )
15 type requestError struct {
16 Slug string `json:"error,omitempty"`
17 Field string `json:"field,omitempty"`
18 Param string `json:"param,omitempty"`
19 Header string `json:"header,omitempty"`
20 }