oauth

package
v0.0.0-...-df3db6e Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRegService

type AuthRegService struct {
	Auth     auth.Auther
	Users    users.Users
	Registry AuthRegistry
}

func (*AuthRegService) Register

func (t *AuthRegService) Register(root string, c *restful.Container)

func (*AuthRegService) Shutdown

func (t *AuthRegService) Shutdown()

type AuthRegistration

type AuthRegistration struct {
	Type           ProviderType `json:"type"`
	Network        string       `json:"network"`
	ClientId       string       `json:"clientid"`
	ClientSecret   string       `json:"clientsecret"`
	Scopes         string       `json:"scopes"`
	AuthUrl        string       `json:"auth_url"`
	AccessTokenUrl string       `json:"accesstoken_url"`
	UserinfoUrl    string       `json:"userinfo_url"`
	PathId         string       `json:"pathid"`
	PathName       string       `json:"pathname"`
	PathPicture    string       `json:"pathpicture"`
	PathCover      string       `json:"pathcover"`
}

type AuthRegistry

type AuthRegistry interface {
	Create(tp ProviderType, network string, clientid, clientsecrect, scopes, authurl, accessurl, userinfourl, pathid, pathname, pathpicture, pathcover string) (*AuthRegistration, error)
	Delete(network string) (*AuthRegistration, error)
	Get(network string) (*AuthRegistration, error)
	GetAll() ([]AuthRegistration, error)
}

func New

func New(cc *etcd.Cluster) (AuthRegistry, error)

type LoginProvider

type LoginProvider struct {
	Type     ProviderType `json:"type"`
	Network  string       `json:"network"`
	ClientId string       `json:"clientid"`
	Scopes   string       `json:"scopes"`
	AuthUrl  string       `json:"authurl"`
}

type ProviderType

type ProviderType string

Jump to

Keyboard shortcuts

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