-
Notifications
You must be signed in to change notification settings - Fork 370
/
Copy pathaccess_token_strategy.go
89 lines (75 loc) · 3.34 KB
/
access_token_strategy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright © 2025 Ory Corp
// SPDX-License-Identifier: Apache-2.0
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/ory/fosite/handler/oauth2 (interfaces: AccessTokenStrategy)
//
// Generated by this command:
//
// mockgen -package internal -destination internal/access_token_strategy.go github.com/ory/fosite/handler/oauth2 AccessTokenStrategy
//
// Package internal is a generated GoMock package.
package internal
import (
context "context"
reflect "reflect"
fosite "github.com/ory/fosite"
gomock "go.uber.org/mock/gomock"
)
// MockAccessTokenStrategy is a mock of AccessTokenStrategy interface.
type MockAccessTokenStrategy struct {
ctrl *gomock.Controller
recorder *MockAccessTokenStrategyMockRecorder
isgomock struct{}
}
// MockAccessTokenStrategyMockRecorder is the mock recorder for MockAccessTokenStrategy.
type MockAccessTokenStrategyMockRecorder struct {
mock *MockAccessTokenStrategy
}
// NewMockAccessTokenStrategy creates a new mock instance.
func NewMockAccessTokenStrategy(ctrl *gomock.Controller) *MockAccessTokenStrategy {
mock := &MockAccessTokenStrategy{ctrl: ctrl}
mock.recorder = &MockAccessTokenStrategyMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAccessTokenStrategy) EXPECT() *MockAccessTokenStrategyMockRecorder {
return m.recorder
}
// AccessTokenSignature mocks base method.
func (m *MockAccessTokenStrategy) AccessTokenSignature(ctx context.Context, token string) string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AccessTokenSignature", ctx, token)
ret0, _ := ret[0].(string)
return ret0
}
// AccessTokenSignature indicates an expected call of AccessTokenSignature.
func (mr *MockAccessTokenStrategyMockRecorder) AccessTokenSignature(ctx, token any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccessTokenSignature", reflect.TypeOf((*MockAccessTokenStrategy)(nil).AccessTokenSignature), ctx, token)
}
// GenerateAccessToken mocks base method.
func (m *MockAccessTokenStrategy) GenerateAccessToken(ctx context.Context, requester fosite.Requester) (string, string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GenerateAccessToken", ctx, requester)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(string)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GenerateAccessToken indicates an expected call of GenerateAccessToken.
func (mr *MockAccessTokenStrategyMockRecorder) GenerateAccessToken(ctx, requester any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateAccessToken", reflect.TypeOf((*MockAccessTokenStrategy)(nil).GenerateAccessToken), ctx, requester)
}
// ValidateAccessToken mocks base method.
func (m *MockAccessTokenStrategy) ValidateAccessToken(ctx context.Context, requester fosite.Requester, token string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ValidateAccessToken", ctx, requester, token)
ret0, _ := ret[0].(error)
return ret0
}
// ValidateAccessToken indicates an expected call of ValidateAccessToken.
func (mr *MockAccessTokenStrategyMockRecorder) ValidateAccessToken(ctx, requester, token any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAccessToken", reflect.TypeOf((*MockAccessTokenStrategy)(nil).ValidateAccessToken), ctx, requester, token)
}