Documentation
¶
Index ¶
- Constants
- func DebugStaticCredentials(user, password []byte) func(req AuthRequest) (*AuthResponse, error)
- func Protocol() protocol.Payload
- type AuthRequest
- type AuthResponse
- type OpCode
- type Payload
- func (p *Payload) Decode(raw []byte) error
- func (p *Payload) Encode() ([]byte, error)
- func (p *Payload) Handle(ctx protocol.Context) protocol.Payload
- func (p *Payload) ModifyRADIUSResponse(r *radius.Packet, q *radius.Packet) error
- func (p *Payload) Offerable() bool
- func (p *Payload) String() string
- func (p *Payload) Type() protocol.Type
- type Response
- type Settings
- type State
- type SuccessRequest
Constants ¶
View Source
const TypeMSCHAPv2 protocol.Type = 26
Variables ¶
This section is empty.
Functions ¶
func DebugStaticCredentials ¶
func DebugStaticCredentials(user, password []byte) func(req AuthRequest) (*AuthResponse, error)
Types ¶
type AuthRequest ¶
type AuthResponse ¶
type Payload ¶
type Payload struct {
OpCode OpCode
MSCHAPv2ID uint8
MSLength uint16
ValueSize uint8
Challenge []byte
Response []byte
Name []byte
// contains filtered or unexported fields
}
func (*Payload) ModifyRADIUSResponse ¶
type Response ¶
func ParseResponse ¶
type Settings ¶
type Settings struct {
AuthenticateRequest func(req AuthRequest) (*AuthResponse, error)
ServerIdentifier string
}
type State ¶
type State struct {
Challenge []byte
PeerChallenge []byte
IsProtocolEnded bool
AuthResponse *AuthResponse
}
type SuccessRequest ¶
func (*SuccessRequest) Encode ¶
func (sr *SuccessRequest) Encode() ([]byte, error)
A success request is encoded slightly differently, it doesn't have a challenge and as such doesn't need to encode the length of it
Click to show internal directories.
Click to hide internal directories.