ssocookie

package
v0.0.0-...-afb39b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2015 License: GPL-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(e error)

func CreateCookie

func CreateCookie(ip string, payload *CookiePayload, privkey *ecdsa.PrivateKey, expiry time.Duration) string

func CreateHash

func CreateHash(ip string, sso_cookie *Cookie) []byte

func PrintPublicKey

func PrintPublicKey(pubkey crypto.PublicKey)

func ReadECCPrivateKeyPem

func ReadECCPrivateKeyPem(filename string) (*ecdsa.PrivateKey, error)

func ReadECCPublicKeyPem

func ReadECCPublicKeyPem(filename string, Pubkey crypto.PublicKey) (interface{}, error)

func VerifyCookie

func VerifyCookie(ip string, sso_cookie *Cookie, pubkey *ecdsa.PublicKey) bool

Types

type Cookie struct {
	R big.Int       // ECDSA-Signature R
	S big.Int       // ECDSA-Signature S
	E int32         // Expiry timestamp
	P CookiePayload // Payload
}

type CookiePayload

type CookiePayload struct {
	U string // Username string
	G string // Group string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL