auth

package module
v0.0.0-...-30bb459 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package auth implements read-only access to cookies generated by Django's signed_cookies session backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewDefaultSession

func NewDefaultSession(secret string) *Session

func NewSession

func NewSession(maxAge time.Duration, secret string, salt string, fnHash func() hash.Hash, separator []byte) *Session

func (Session) Decode

func (s Session) Decode(cookie string) (map[string]interface{}, error)

Decode implements cookie object decoding in a way that is compatible with django.core.signing.loads. It returns a map representing the encoded object, or an error if one occurred.

Jump to

Keyboard shortcuts

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