mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* Disable plugin service account
* Fix bug seen by linoman 💯
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
* Account for PR feedback
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
* Fix test data
* Enable datasource plugins by default
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Update pkg/services/extsvcauth/oauthserver/oasimpl/service.go
* Handle error differently
* Fix service reg
---------
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
26 lines
754 B
Go
26 lines
754 B
Go
package oauthserver
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/util/errutil"
|
|
)
|
|
|
|
var (
|
|
ErrClientNotFoundMessageID = "oauthserver.client-not-found"
|
|
)
|
|
|
|
var (
|
|
ErrClientRequiredID = errutil.BadRequest(
|
|
"oauthserver.required-client-id",
|
|
errutil.WithPublicMessage("client ID is required")).Errorf("Client ID is required")
|
|
ErrClientRequiredName = errutil.BadRequest(
|
|
"oauthserver.required-client-name",
|
|
errutil.WithPublicMessage("client name is required")).Errorf("Client name is required")
|
|
ErrClientNotFound = errutil.NotFound(
|
|
ErrClientNotFoundMessageID,
|
|
errutil.WithPublicMessage("Requested client has not been found"))
|
|
)
|
|
|
|
func ErrClientNotFoundFn(clientID string) error {
|
|
return ErrClientNotFound.Errorf("client '%s' not found", clientID)
|
|
}
|