api: Cleanup websocket protocol
This commit cleans up the websocket protocol to be in line with the documentation.
This commit is contained in:
parent
16fa721048
commit
1c68893a02
31 changed files with 3549 additions and 120 deletions
36
internal/dis/component/auth/scopes/never.go
Normal file
36
internal/dis/component/auth/scopes/never.go
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue