more refactor

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-23 17:59:00 +02:00
parent 4571f5e644
commit 8da54d5811
12 changed files with 72 additions and 65 deletions

View File

@ -12,26 +12,26 @@ type Payload struct {
Identity string
}
func (ip *Payload) Type() protocol.Type {
func (p *Payload) Type() protocol.Type {
return TypeIdentity
}
func (ip *Payload) Decode(raw []byte) error {
ip.Identity = string(raw)
func (p *Payload) Decode(raw []byte) error {
p.Identity = string(raw)
return nil
}
func (ip *Payload) Encode() ([]byte, error) {
func (p *Payload) Encode() ([]byte, error) {
return []byte{}, nil
}
func (ip *Payload) Handle(ctx protocol.Context) protocol.Payload {
func (p *Payload) Handle(ctx protocol.Context) protocol.Payload {
if ctx.IsProtocolStart(TypeIdentity) {
ctx.EndInnerProtocol(protocol.StatusNextProtocol, nil)
}
return nil
}
func (ip *Payload) Offerable() bool {
func (p *Payload) Offerable() bool {
return false
}