This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
/
authentication_context.go
156 lines (126 loc) · 3.28 KB
/
authentication_context.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import config "github.com/lyft/flyteadmin/pkg/auth/config"
import http "net/http"
import interfaces "github.com/lyft/flyteadmin/pkg/auth/interfaces"
import mock "github.com/stretchr/testify/mock"
import oauth2 "golang.org/x/oauth2"
import oidc "github.com/coreos/go-oidc"
import url "net/url"
// AuthenticationContext is an autogenerated mock type for the AuthenticationContext type
type AuthenticationContext struct {
mock.Mock
}
// Claims provides a mock function with given fields:
func (_m *AuthenticationContext) Claims() config.Claims {
ret := _m.Called()
var r0 config.Claims
if rf, ok := ret.Get(0).(func() config.Claims); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(config.Claims)
}
return r0
}
// CookieManager provides a mock function with given fields:
func (_m *AuthenticationContext) CookieManager() interfaces.CookieHandler {
ret := _m.Called()
var r0 interfaces.CookieHandler
if rf, ok := ret.Get(0).(func() interfaces.CookieHandler); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(interfaces.CookieHandler)
}
}
return r0
}
// GetBaseURL provides a mock function with given fields:
func (_m *AuthenticationContext) GetBaseURL() *url.URL {
ret := _m.Called()
var r0 *url.URL
if rf, ok := ret.Get(0).(func() *url.URL); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*url.URL)
}
}
return r0
}
// GetHTTPClient provides a mock function with given fields:
func (_m *AuthenticationContext) GetHTTPClient() *http.Client {
ret := _m.Called()
var r0 *http.Client
if rf, ok := ret.Get(0).(func() *http.Client); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Client)
}
}
return r0
}
// GetMetadataURL provides a mock function with given fields:
func (_m *AuthenticationContext) GetMetadataURL() *url.URL {
ret := _m.Called()
var r0 *url.URL
if rf, ok := ret.Get(0).(func() *url.URL); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*url.URL)
}
}
return r0
}
// GetUserInfoURL provides a mock function with given fields:
func (_m *AuthenticationContext) GetUserInfoURL() *url.URL {
ret := _m.Called()
var r0 *url.URL
if rf, ok := ret.Get(0).(func() *url.URL); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*url.URL)
}
}
return r0
}
// OAuth2Config provides a mock function with given fields:
func (_m *AuthenticationContext) OAuth2Config() *oauth2.Config {
ret := _m.Called()
var r0 *oauth2.Config
if rf, ok := ret.Get(0).(func() *oauth2.Config); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*oauth2.Config)
}
}
return r0
}
// OidcProvider provides a mock function with given fields:
func (_m *AuthenticationContext) OidcProvider() *oidc.Provider {
ret := _m.Called()
var r0 *oidc.Provider
if rf, ok := ret.Get(0).(func() *oidc.Provider); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*oidc.Provider)
}
}
return r0
}
// Options provides a mock function with given fields:
func (_m *AuthenticationContext) Options() config.OAuthOptions {
ret := _m.Called()
var r0 config.OAuthOptions
if rf, ok := ret.Get(0).(func() config.OAuthOptions); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(config.OAuthOptions)
}
return r0
}