base

package
v0.0.0-...-f52735e Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package base contains interface and struct definitions used by the rest of the code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks interface {
	/*
	   GetOrCreateUser is called when a user logs in and tt_goji_oauth has obtained
	   identifying information about the user from the oauth provider.

	   providerName - Name of the provider that produced the user information (e.g. "github")
	   user         - Map of user information from the provider. see github.com/philpearl/tt_goji_oauth/providers

	   Return a url if you want to redirect the user to a particular page (e.g. to fill in a user profile form
	   for a new user, or to read updated terms & conditions)
	*/
	GetOrCreateUser(c web.C, providerName string, user map[string]interface{}) (string, error)
}

Callbacks defines the interface between tt_goji_oauth and the ret of the application

type Context

type Context struct {
	SessionHolder base.SessionHolder
	ProviderStore *providers.ProviderStore
	Callbacks     Callbacks
}

Context for tt_goji_oauth

Jump to

Keyboard shortcuts

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