test

package
v0.0.0-...-d6f744c Latest Latest
Warning

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

Go to latest
Published: May 1, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOGIN_URL    = "http://localhost:1919/login"
	REDIRECT_URL = "http://localhost:1919/redirect"
	AUTH_URL     = "http://localhost:1919/authorize"
	TOKEN_URL    = "http://localhost:1919/token"
	TEST_URL     = "http://localhost:1919/nickname"
	CLIENT_URL   = "http://localhost:1919/client"

	USERNAME = "aoisensi"
	PASSWORD = "pAss30rD"
	NICKNAME = "I♥GO"

	CLIENT_ID     = "cLiEnTiD"
	CLIENT_SECRET = "cLiEnTsEcReT"
)

Variables

View Source
var (
	OConfig = oauth2.Config{
		Endpoint: oauth2.Endpoint{
			AuthURL:  AUTH_URL,
			TokenURL: TOKEN_URL,
		},
	}
)
View Source
var Token *oauth2.Token
View Source
var (
	User = &Client{Nickname: NICKNAME}
)

Functions

This section is empty.

Types

type Client

type Client struct {
	Nickname string
}

type Owner

type Owner struct {
	oguth.ResourceOwner
}

func NewOwner

func NewOwner() *Owner

func (*Owner) AuthCodeDecision

func (o *Owner) AuthCodeDecision(r *http.Request, clientId string) oguth.Client

func (*Owner) AuthCodeMissing

func (o *Owner) AuthCodeMissing(w http.ResponseWriter, r *http.Request)

func (*Owner) ExistClientId

func (o *Owner) ExistClientId(id string) bool

func (*Owner) GetClientWithPasswordGrant

func (o *Owner) GetClientWithPasswordGrant(username, password string) oguth.Client

func (*Owner) GetRedirectUri

func (o *Owner) GetRedirectUri(clientId string) string

Jump to

Keyboard shortcuts

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