auth

package
v0.0.0-...-3a21483 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

Authenticator ...

func (*Authenticator) EnrichRequest

func (a *Authenticator) EnrichRequest(r *http.Request, URL string)

EnrichRequest ...

func (*Authenticator) GetEnrichedQuery

func (a *Authenticator) GetEnrichedQuery(url string, query url.Values, req request.Request) url.Values

GetEnrichedQuery ...

func (*Authenticator) IsSsl

func (a *Authenticator) IsSsl(url string) bool

IsSsl method determines HTTPS protocol URL

func (*Authenticator) SetBasicAuth

func (a *Authenticator) SetBasicAuth(ba BasicAuthentication)

SetBasicAuth method sets BasicAuthentication object to structure's inner variable

func (*Authenticator) SetOAuth

func (a *Authenticator) SetOAuth(o OAuth)

SetOAuth method sets OAuth object to structure's inner variable

func (*Authenticator) SetOptions

func (a *Authenticator) SetOptions(o options.Basic)

SetOptions ...

type BasicAuthentication

type BasicAuthentication struct{}

BasicAuthentication structure stores all required parameter values

func (*BasicAuthentication) GetEnrichedQuery

func (b *BasicAuthentication) GetEnrichedQuery(p url.Values, o options.Basic) url.Values

GetEnrichedQuery method might get Parameters Enriched using Options

type BasicAuthenticationQueryEnricher

type BasicAuthenticationQueryEnricher interface {
	GetEnrichedQuery(p url.Values, o options.Basic) url.Values
}

BasicAuthenticationQueryEnricher ...

type MicroTimer

type MicroTimer struct {
}

MicroTimer ...

func (*MicroTimer) Get

func (m *MicroTimer) Get() string

Get current micro time

type MicroTimerInterface

type MicroTimerInterface interface {
	Get() string
}

MicroTimerInterface should return string with microtime which will be used for hashing

type MicroTimerMock

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

MicroTimerMock ...

func (*MicroTimerMock) Get

func (m *MicroTimerMock) Get() string

Get returns prepared result of function running

type OAuth

type OAuth struct {
	URL        string
	Key        string
	Secret     string
	Version    string
	Method     string
	Parameters url.Values
	Timestamp  string
	MicroTimer MicroTimerInterface
}

OAuth authentication for doing non-SSL requests

func (*OAuth) GetEnrichedQuery

func (o *OAuth) GetEnrichedQuery() url.Values

GetEnrichedQuery which appended OAuth specific ones

func (*OAuth) SetMethod

func (o *OAuth) SetMethod(method string)

SetMethod ...

func (*OAuth) SetMicrotimer

func (o *OAuth) SetMicrotimer(m MicroTimerInterface)

SetMicrotimer ...

func (*OAuth) SetOptions

func (o *OAuth) SetOptions(opt options.Basic)

SetOptions ...

func (*OAuth) SetParameters

func (o *OAuth) SetParameters(params url.Values)

SetParameters ...

func (*OAuth) SetURL

func (o *OAuth) SetURL(url string)

SetURL ...

type OAuthQueryEnricher

type OAuthQueryEnricher interface {
}

Jump to

Keyboard shortcuts

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