wisski-cloud-distillery/internal/dis/component/auth/scopes/never.go
Tom 1c68893a02 api: Cleanup websocket protocol
This commit cleans up the websocket protocol to be in line with the
documentation.
2023-07-13 23:24:11 +02:00

36 lines
651 B
Go

package scopes
import (
"net/http"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/auth"
)
type Never struct {
component.Base
Dependencies struct {
Auth *auth.Auth
}
}
var (
_ component.ScopeProvider = (*Never)(nil)
)
const (
ScopeNever Scope = "never"
)
func (*Never) Scope() component.ScopeInfo {
return component.ScopeInfo{
Scope: ScopeNever,
Description: "scope that is never fullfilled",
DeniedMessage: "no one can do this",
TakesParam: false,
}
}
func (*Never) HasScope(string, *http.Request) (bool, error) {
return false, nil
}