Documentation
¶
Index ¶
- Constants
- type Data
- func (*Data) Descriptor() ([]byte, []int)
- func (m *Data) GetNonce() string
- func (m *Data) GetTimestamp() int64
- func (m *Data) GetUserdata() []byte
- func (m *Data) Pack() ([]byte, error)
- func (*Data) ProtoMessage()
- func (m *Data) Reset()
- func (m *Data) String() string
- func (m *Data) XXX_DiscardUnknown()
- func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Data) XXX_Merge(src proto.Message)
- func (m *Data) XXX_Size() int
- func (m *Data) XXX_Unmarshal(b []byte) error
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)
- func (m *Envelope) GetNonce() []byte
- func (m *Envelope) GetPayload() []byte
- func (m *Envelope) GetProvider() string
- func (m *Envelope) GetSalt() []byte
- func (m *Envelope) Open(key []byte) ([]byte, error)
- func (m *Envelope) Pack() (string, error)
- func (*Envelope) ProtoMessage()
- func (m *Envelope) Reset()
- func (m *Envelope) Seal(key, payload []byte) error
- func (m *Envelope) String() string
- func (m *Envelope) XXX_DiscardUnknown()
- func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Envelope) XXX_Merge(src proto.Message)
- func (m *Envelope) XXX_Size() int
- func (m *Envelope) XXX_Unmarshal(b []byte) error
- type Error
- type Verifier
- func (pa *Verifier) New(provider, oidcNonce string) (string, string, error)
- func (pa *Verifier) NewWithData(provider, nonce string, userData []byte) (string, string, error)
- func (pa *Verifier) Validate(cookie, state string, t time.Duration) (nonce string, err error)
- func (pa *Verifier) ValidateWithData(cookie, stateparam string, t time.Duration) (nonce string, userData []byte, err error)
Constants ¶
View Source
const ( ErrParse = Error("parse error") ErrUnsupported = Error("unsupported format") ErrInvalid = Error("invalid input") ErrInvalidState = Error("invalid state") ErrNetwork = Error("network error") )
View Source
const (
MaxUserDataSize = 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Nonce string `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` Userdata []byte `protobuf:"bytes,3,opt,name=userdata,proto3" json:"userdata,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
that give the envelope payload message StateValue {
func (*Data) Descriptor ¶
func (*Data) GetTimestamp ¶
func (*Data) GetUserdata ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) XXX_DiscardUnknown ¶
func (m *Data) XXX_DiscardUnknown()
func (*Data) XXX_Unmarshal ¶
type Envelope ¶
type Envelope struct { Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` Salt []byte `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"` Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
that gives the cookie.. message StateCookieValue {
func ParseEnvelope ¶
func (*Envelope) Descriptor ¶
func (*Envelope) GetPayload ¶
func (*Envelope) GetProvider ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) XXX_DiscardUnknown ¶
func (m *Envelope) XXX_DiscardUnknown()
func (*Envelope) XXX_Marshal ¶
func (*Envelope) XXX_Unmarshal ¶
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
func NewVerifier ¶
func (*Verifier) NewWithData ¶
duration would be 30 minutes -> NOW() func (oa *ProviderAuth) State(password, secret []byte, oidcNonce string) (*OidcStateValue, error) { let's limit that state otherwise... let's limit nonceSize also
Click to show internal directories.
Click to hide internal directories.