Documentation ¶
Index ¶
- type KeyPair
- type Session
- func (s Session) GenerateAuthorization(userId, sessionId string) (string, error)
- func (s Session) MustParse(token string) map[string]interface{}
- func (s Session) MustSign(claims map[string]interface{}) string
- func (s Session) Parse(tokenString string) (map[string]interface{}, error)
- func (s Session) ParseAuthorization(auth string) (userId, sessionId string, ok bool)
- func (s *Session) SetString(input string) (err error)
- func (s Session) Sign(claims map[string]interface{}) (string, error)
- func (s Session) String() string
- type SessionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyPair ¶
type KeyPair struct { *rsa.PrivateKey *rsa.PublicKey }
func NewKeyPair ¶
func NewKeyPair() *KeyPair
type Session ¶
type Session struct { Keys *KeyPair Options *SessionOptions }
func NewSession ¶
func NewSession(options *SessionOptions) *Session
func (Session) GenerateAuthorization ¶
func (Session) ParseAuthorization ¶
type SessionOptions ¶
Click to show internal directories.
Click to hide internal directories.