test

package
v0.0.0-...-4debe6f Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2015 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	Client        types.Client
	Grants        map[string]types.Grant
	AccessTokens  map[string]types.Token
	RefreshTokens map[string]types.Token
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(isUserAuthenticated bool) *Provider

func (*Provider) AuthenticateClient

func (p *Provider) AuthenticateClient(username, password string) (types.Client, error)

func (*Provider) AuthenticateUser

func (p *Provider) AuthenticateUser(username, password string) bool

func (*Provider) ClientInfo

func (p *Provider) ClientInfo(clientID string) (types.Client, error)

func (*Provider) GenGrant

func (p *Provider) GenGrant(client types.Client, scopes types.Scopes, expiration time.Duration) (types.Grant, error)

func (*Provider) GenToken

func (p *Provider) GenToken(grant types.Grant, client types.Client, refreshToken bool, expiration time.Duration) (types.Token, error)

func (*Provider) GrantInfo

func (p *Provider) GrantInfo(code string) (types.Grant, error)

func (*Provider) IsUserAuthenticated

func (p *Provider) IsUserAuthenticated() bool

func (*Provider) RefreshToken

func (p *Provider) RefreshToken(refreshToken types.Token, scopes types.Scopes) (types.Token, error)

func (*Provider) ResourceScopes

func (p *Provider) ResourceScopes(url *url.URL) (types.Scopes, error)

func (*Provider) RevokeToken

func (p *Provider) RevokeToken(token string) error

func (*Provider) ScopesInfo

func (p *Provider) ScopesInfo(scopes string) (types.Scopes, error)

func (*Provider) TokenInfo

func (p *Provider) TokenInfo(code string) (types.Token, error)

Jump to

Keyboard shortcuts

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