api

package
v0.0.0-...-a940e1d Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const RFC1123 = "Mon, 02 Jan 2006 15:04:05 GMT"

RFC1123 to be used with UTC timezone *only*

Variables

This section is empty.

Functions

func Callback

func Callback(ctx context.Context) http.HandlerFunc

Callback receives oauth returns from sso

func CharacterDetails

func CharacterDetails(ctx context.Context) http.HandlerFunc

CharacterDetails returns JSON describing the character

func Custom

func Custom(ctx context.Context) http.HandlerFunc

Custom character view, defined by character preferences

func NewLogin

func NewLogin(ctx context.Context) http.HandlerFunc

NewLogin creates a new state and throws the user into the oauth flow

func NewProvider

func NewProvider(ctx context.Context) context.Context

NewProvider creates our oidc provider

func Ping

func Ping(w http.ResponseWriter, _req *http.Request)

Ping returns a simple 200 ok

func Preferences

func Preferences(ctx context.Context) http.HandlerFunc

Preferences handles getting and setting user preferences

func TopRecipients

func TopRecipients(ctx context.Context) http.HandlerFunc

TopRecipients returns JSON describing the current top donation recipients

func VerifyTokenHack

func VerifyTokenHack(ctx context.Context, token string) (
	charID int32,
	owner string,
	err error,
)

VerifyTokenHack pulls the charID and owner hash from the JWT

Types

type StateStore

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

StateStore stores state uuids we've given out

func NewStateStore

func NewStateStore() *StateStore

NewStateStore returns a new StateStore

type VerifyModel

type VerifyModel struct {
	CharacterID        int32
	CharacterOwnerHash string
}

VerifyModel is needed as a hack until an sso issue is fixed

Jump to

Keyboard shortcuts

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