mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
6891bbf03c
* Add prefixed API key gen. * Retrieve API Key by hash * Handle prefixed API keys for login * Add placeholder key generator * fix spelling * add get by hash sqlstore test * reformat query * quote usage of reserved keyword key * use constant * improve error handling and pre-select key type Co-authored-by: Victor Cinaglia <victor@grafana.com> * nits Co-authored-by: Victor Cinaglia <victor@grafana.com>
15 lines
275 B
Go
15 lines
275 B
Go
package apikeygenprefix
|
|
|
|
import "github.com/grafana/grafana/pkg/components/apikeygen"
|
|
|
|
type ErrInvalidApiKey struct {
|
|
}
|
|
|
|
func (e *ErrInvalidApiKey) Error() string {
|
|
return "invalid API key"
|
|
}
|
|
|
|
func (e *ErrInvalidApiKey) Unwrap() error {
|
|
return apikeygen.ErrInvalidApiKey
|
|
}
|