oauthbolt

package
v0.0.0-...-df570b3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthBolt

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

OAuthBolt defines struct which implements the OAuthService interface to provide OAuth authentication using boltdb as the underline session storage.

func New

func New(client *auth.Auth) (*OAuthBolt, error)

New returns a new instance of a OAuthBolt.

func (*OAuthBolt) Approve

func (au *OAuthBolt) Approve(ctx context.Context, response service.IdentityResponse) error

Approve receives the giving response and uses the underline oauth client to retrieve access token.

func (*OAuthBolt) Authenticate

func (au *OAuthBolt) Authenticate(ctx context.Context, identity string, authtype string, token string) error

Authenticate attempts to validate giving identity against provided token and auth type.

func (*OAuthBolt) Get

func (au *OAuthBolt) Get(ctx context.Context, identity string) (service.Identity, error)

Get attempts to retrieve a identity record associated with the identity.

func (*OAuthBolt) Identities

func (au *OAuthBolt) Identities(ctx context.Context) ([]service.Identity, error)

Identities returns all available valid identites within the store.

func (*OAuthBolt) New

func (au *OAuthBolt) New(ctx context.Context, identity string, secret string) (string, error)

New returns a new URl for the giving identity and secret which is suited for requesting access.

func (*OAuthBolt) Revoke

func (au *OAuthBolt) Revoke(ctx context.Context, identity string) error

Revoke attempts to revoke authorization as regarding the giving identitys and will remove any record associated with the identity.

Jump to

Keyboard shortcuts

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