evaluator

package
v0.11.12 Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessRequest

type AccessRequest struct {
	swagger.WardenTokenAccessRequest
	Public bool
}

type Evaluator

type Evaluator interface {
	EvaluateAccessRequest(r *http.Request) (*Session, error)
}

type MockJWKApi

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

Mock of JWKApi interface

func NewMockJWKApi

func NewMockJWKApi(ctrl *gomock.Controller) *MockJWKApi

func (*MockJWKApi) CreateJsonWebKeySet

func (*MockJWKApi) DeleteJsonWebKey

func (_m *MockJWKApi) DeleteJsonWebKey(kid string, set string) (*swagger.APIResponse, error)

func (*MockJWKApi) DeleteJsonWebKeySet

func (_m *MockJWKApi) DeleteJsonWebKeySet(set string) (*swagger.APIResponse, error)

func (*MockJWKApi) EXPECT

func (_m *MockJWKApi) EXPECT() *_MockJWKApiRecorder

func (*MockJWKApi) GetJsonWebKey

func (_m *MockJWKApi) GetJsonWebKey(kid string, set string) (*swagger.JsonWebKeySet, *swagger.APIResponse, error)

func (*MockJWKApi) GetJsonWebKeySet

func (_m *MockJWKApi) GetJsonWebKeySet(set string) (*swagger.JsonWebKeySet, *swagger.APIResponse, error)

func (*MockJWKApi) UpdateJsonWebKey

func (_m *MockJWKApi) UpdateJsonWebKey(kid string, set string, body swagger.JsonWebKey) (*swagger.JsonWebKey, *swagger.APIResponse, error)

func (*MockJWKApi) UpdateJsonWebKeySet

func (_m *MockJWKApi) UpdateJsonWebKeySet(set string, body swagger.JsonWebKeySet) (*swagger.JsonWebKeySet, *swagger.APIResponse, error)

type MockOAuth2API

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

Mock of OAuth2API interface

func NewMockOAuth2API

func NewMockOAuth2API(ctrl *gomock.Controller) *MockOAuth2API

func (*MockOAuth2API) AcceptOAuth2ConsentRequest

func (_m *MockOAuth2API) AcceptOAuth2ConsentRequest(id string, body swagger.ConsentRequestAcceptance) (*swagger.APIResponse, error)

func (*MockOAuth2API) CreateOAuth2Client

func (_m *MockOAuth2API) CreateOAuth2Client(body swagger.OAuth2Client) (*swagger.OAuth2Client, *swagger.APIResponse, error)

func (*MockOAuth2API) DeleteOAuth2Client

func (_m *MockOAuth2API) DeleteOAuth2Client(id string) (*swagger.APIResponse, error)

func (*MockOAuth2API) EXPECT

func (_m *MockOAuth2API) EXPECT() *_MockOAuth2APIRecorder

func (*MockOAuth2API) GetOAuth2Client

func (_m *MockOAuth2API) GetOAuth2Client(id string) (*swagger.OAuth2Client, *swagger.APIResponse, error)

func (*MockOAuth2API) GetOAuth2ConsentRequest

func (_m *MockOAuth2API) GetOAuth2ConsentRequest(id string) (*swagger.OAuth2ConsentRequest, *swagger.APIResponse, error)

func (*MockOAuth2API) GetWellKnown

func (_m *MockOAuth2API) GetWellKnown() (*swagger.WellKnown, *swagger.APIResponse, error)

func (*MockOAuth2API) IntrospectOAuth2Token

func (_m *MockOAuth2API) IntrospectOAuth2Token(token string, scope string) (*swagger.OAuth2TokenIntrospection, *swagger.APIResponse, error)

func (*MockOAuth2API) ListOAuth2Clients

func (_m *MockOAuth2API) ListOAuth2Clients() ([]swagger.OAuth2Client, *swagger.APIResponse, error)

func (*MockOAuth2API) RejectOAuth2ConsentRequest

func (_m *MockOAuth2API) RejectOAuth2ConsentRequest(id string, body swagger.ConsentRequestRejection) (*swagger.APIResponse, error)

func (*MockOAuth2API) RevokeOAuth2Token

func (_m *MockOAuth2API) RevokeOAuth2Token(token string) (*swagger.APIResponse, error)

func (*MockOAuth2API) UpdateOAuth2Client

func (_m *MockOAuth2API) UpdateOAuth2Client(id string, body swagger.OAuth2Client) (*swagger.OAuth2Client, *swagger.APIResponse, error)

type MockPolicyAPI

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

Mock of PolicyAPI interface

func NewMockPolicyAPI

func NewMockPolicyAPI(ctrl *gomock.Controller) *MockPolicyAPI

func (*MockPolicyAPI) CreatePolicy

func (_m *MockPolicyAPI) CreatePolicy(body swagger.Policy) (*swagger.Policy, *swagger.APIResponse, error)

func (*MockPolicyAPI) DeletePolicy

func (_m *MockPolicyAPI) DeletePolicy(id string) (*swagger.APIResponse, error)

func (*MockPolicyAPI) EXPECT

func (_m *MockPolicyAPI) EXPECT() *_MockPolicyAPIRecorder

func (*MockPolicyAPI) GetPolicy

func (_m *MockPolicyAPI) GetPolicy(id string) (*swagger.Policy, *swagger.APIResponse, error)

func (*MockPolicyAPI) ListPolicies

func (_m *MockPolicyAPI) ListPolicies(offset int64, limit int64) ([]swagger.Policy, *swagger.APIResponse, error)

func (*MockPolicyAPI) UpdatePolicy

func (_m *MockPolicyAPI) UpdatePolicy(id string, body swagger.Policy) (*swagger.Policy, *swagger.APIResponse, error)

type MockSDK

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

Mock of SDK interface

func NewMockSDK

func NewMockSDK(ctrl *gomock.Controller) *MockSDK

func (*MockSDK) AcceptOAuth2ConsentRequest

func (_m *MockSDK) AcceptOAuth2ConsentRequest(id string, body swagger.ConsentRequestAcceptance) (*swagger.APIResponse, error)

func (*MockSDK) AddMembersToGroup

func (_m *MockSDK) AddMembersToGroup(id string, body swagger.GroupMembers) (*swagger.APIResponse, error)

func (*MockSDK) CreateGroup

func (_m *MockSDK) CreateGroup(body swagger.Group) (*swagger.Group, *swagger.APIResponse, error)

func (*MockSDK) CreateJsonWebKeySet

func (*MockSDK) CreateOAuth2Client

func (_m *MockSDK) CreateOAuth2Client(body swagger.OAuth2Client) (*swagger.OAuth2Client, *swagger.APIResponse, error)

func (*MockSDK) CreatePolicy

func (_m *MockSDK) CreatePolicy(body swagger.Policy) (*swagger.Policy, *swagger.APIResponse, error)

func (*MockSDK) DeleteGroup

func (_m *MockSDK) DeleteGroup(id string) (*swagger.APIResponse, error)

func (*MockSDK) DeleteJsonWebKey

func (_m *MockSDK) DeleteJsonWebKey(kid string, set string) (*swagger.APIResponse, error)

func (*MockSDK) DeleteJsonWebKeySet

func (_m *MockSDK) DeleteJsonWebKeySet(set string) (*swagger.APIResponse, error)

func (*MockSDK) DeleteOAuth2Client

func (_m *MockSDK) DeleteOAuth2Client(id string) (*swagger.APIResponse, error)

func (*MockSDK) DeletePolicy

func (_m *MockSDK) DeletePolicy(id string) (*swagger.APIResponse, error)

func (*MockSDK) EXPECT

func (_m *MockSDK) EXPECT() *_MockSDKRecorder

func (*MockSDK) GetGroup

func (_m *MockSDK) GetGroup(id string) (*swagger.Group, *swagger.APIResponse, error)

func (*MockSDK) GetJsonWebKey

func (_m *MockSDK) GetJsonWebKey(kid string, set string) (*swagger.JsonWebKeySet, *swagger.APIResponse, error)

func (*MockSDK) GetJsonWebKeySet

func (_m *MockSDK) GetJsonWebKeySet(set string) (*swagger.JsonWebKeySet, *swagger.APIResponse, error)

func (*MockSDK) GetOAuth2Client

func (_m *MockSDK) GetOAuth2Client(id string) (*swagger.OAuth2Client, *swagger.APIResponse, error)

func (*MockSDK) GetOAuth2ClientConfig

func (_m *MockSDK) GetOAuth2ClientConfig() *clientcredentials.Config

func (*MockSDK) GetOAuth2Config

func (_m *MockSDK) GetOAuth2Config() *oauth2.Config

func (*MockSDK) GetOAuth2ConsentRequest

func (_m *MockSDK) GetOAuth2ConsentRequest(id string) (*swagger.OAuth2ConsentRequest, *swagger.APIResponse, error)

func (*MockSDK) GetPolicy

func (_m *MockSDK) GetPolicy(id string) (*swagger.Policy, *swagger.APIResponse, error)

func (*MockSDK) GetWellKnown

func (_m *MockSDK) GetWellKnown() (*swagger.WellKnown, *swagger.APIResponse, error)

func (*MockSDK) IntrospectOAuth2Token

func (_m *MockSDK) IntrospectOAuth2Token(token string, scope string) (*swagger.OAuth2TokenIntrospection, *swagger.APIResponse, error)

func (*MockSDK) ListGroups

func (_m *MockSDK) ListGroups(member string, limit int64, offset int64) ([]swagger.Group, *swagger.APIResponse, error)

func (*MockSDK) ListOAuth2Clients

func (_m *MockSDK) ListOAuth2Clients() ([]swagger.OAuth2Client, *swagger.APIResponse, error)

func (*MockSDK) ListPolicies

func (_m *MockSDK) ListPolicies(offset int64, limit int64) ([]swagger.Policy, *swagger.APIResponse, error)

func (*MockSDK) RejectOAuth2ConsentRequest

func (_m *MockSDK) RejectOAuth2ConsentRequest(id string, body swagger.ConsentRequestRejection) (*swagger.APIResponse, error)

func (*MockSDK) RemoveMembersFromGroup

func (_m *MockSDK) RemoveMembersFromGroup(id string, body swagger.GroupMembers) (*swagger.APIResponse, error)

func (*MockSDK) RevokeOAuth2Token

func (_m *MockSDK) RevokeOAuth2Token(token string) (*swagger.APIResponse, error)

func (*MockSDK) UpdateJsonWebKey

func (_m *MockSDK) UpdateJsonWebKey(kid string, set string, body swagger.JsonWebKey) (*swagger.JsonWebKey, *swagger.APIResponse, error)

func (*MockSDK) UpdateJsonWebKeySet

func (_m *MockSDK) UpdateJsonWebKeySet(set string, body swagger.JsonWebKeySet) (*swagger.JsonWebKeySet, *swagger.APIResponse, error)

func (*MockSDK) UpdateOAuth2Client

func (_m *MockSDK) UpdateOAuth2Client(id string, body swagger.OAuth2Client) (*swagger.OAuth2Client, *swagger.APIResponse, error)

func (*MockSDK) UpdatePolicy

func (_m *MockSDK) UpdatePolicy(id string, body swagger.Policy) (*swagger.Policy, *swagger.APIResponse, error)

type MockWardenAPI

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

Mock of WardenAPI interface

func NewMockWardenAPI

func NewMockWardenAPI(ctrl *gomock.Controller) *MockWardenAPI

func (*MockWardenAPI) AddMembersToGroup

func (_m *MockWardenAPI) AddMembersToGroup(id string, body swagger.GroupMembers) (*swagger.APIResponse, error)

func (*MockWardenAPI) CreateGroup

func (_m *MockWardenAPI) CreateGroup(body swagger.Group) (*swagger.Group, *swagger.APIResponse, error)

func (*MockWardenAPI) DeleteGroup

func (_m *MockWardenAPI) DeleteGroup(id string) (*swagger.APIResponse, error)

func (*MockWardenAPI) DoesWardenAllowAccessRequest

func (*MockWardenAPI) EXPECT

func (_m *MockWardenAPI) EXPECT() *_MockWardenAPIRecorder

func (*MockWardenAPI) GetGroup

func (_m *MockWardenAPI) GetGroup(id string) (*swagger.Group, *swagger.APIResponse, error)

func (*MockWardenAPI) ListGroups

func (_m *MockWardenAPI) ListGroups(member string, limit int64, offset int64) ([]swagger.Group, *swagger.APIResponse, error)

func (*MockWardenAPI) RemoveMembersFromGroup

func (_m *MockWardenAPI) RemoveMembersFromGroup(id string, body swagger.GroupMembers) (*swagger.APIResponse, error)

type Session

type Session struct {
	User      string      `json:"user"`
	Anonymous bool        `json:"anonymous"`
	Disabled  bool        `json:"disabled"`
	ClientID  string      `json:"clientId"`
	Issuer    string      `json:"issuer"`
	Extra     interface{} `json:"extra"`
}

func (*Session) ToClaims

func (s *Session) ToClaims() jwt.MapClaims

type WardenEvaluator

type WardenEvaluator struct {
	Logger  logrus.FieldLogger
	Matcher rule.Matcher
	Hydra   hydra.SDK
	Issuer  string
}

func NewWardenEvaluator

func NewWardenEvaluator(l logrus.FieldLogger, m rule.Matcher, s hydra.SDK, i string) *WardenEvaluator

func (*WardenEvaluator) EvaluateAccessRequest

func (d *WardenEvaluator) EvaluateAccessRequest(r *http.Request) (*Session, error)

Jump to

Keyboard shortcuts

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