// Code generated by MockGen. DO NOT EDIT.
// Source: oauth2.go
//
// Generated by this command:
//
//	mockgen -destination=mocks/mock_provider.go -package=mocks -source=oauth2.go OAuth2Provider
//

// Package mocks is a generated GoMock package.
package mocks

import (
	context "context"
	reflect "reflect"

	upstream "github.com/stacklok/toolhive/pkg/authserver/upstream"
	gomock "go.uber.org/mock/gomock"
)

// MockOAuth2Provider is a mock of OAuth2Provider interface.
type MockOAuth2Provider struct {
	ctrl     *gomock.Controller
	recorder *MockOAuth2ProviderMockRecorder
	isgomock struct{}
}

// MockOAuth2ProviderMockRecorder is the mock recorder for MockOAuth2Provider.
type MockOAuth2ProviderMockRecorder struct {
	mock *MockOAuth2Provider
}

// NewMockOAuth2Provider creates a new mock instance.
func NewMockOAuth2Provider(ctrl *gomock.Controller) *MockOAuth2Provider {
	mock := &MockOAuth2Provider{ctrl: ctrl}
	mock.recorder = &MockOAuth2ProviderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockOAuth2Provider) EXPECT() *MockOAuth2ProviderMockRecorder {
	return m.recorder
}

// AuthorizationURL mocks base method.
func (m *MockOAuth2Provider) AuthorizationURL(state, codeChallenge string, opts ...upstream.AuthorizationOption) (string, error) {
	m.ctrl.T.Helper()
	varargs := []any{state, codeChallenge}
	for _, a := range opts {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "AuthorizationURL", varargs...)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// AuthorizationURL indicates an expected call of AuthorizationURL.
func (mr *MockOAuth2ProviderMockRecorder) AuthorizationURL(state, codeChallenge any, opts ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{state, codeChallenge}, opts...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorizationURL", reflect.TypeOf((*MockOAuth2Provider)(nil).AuthorizationURL), varargs...)
}

// ExchangeCodeForIdentity mocks base method.
func (m *MockOAuth2Provider) ExchangeCodeForIdentity(ctx context.Context, code, codeVerifier, nonce string) (*upstream.Identity, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ExchangeCodeForIdentity", ctx, code, codeVerifier, nonce)
	ret0, _ := ret[0].(*upstream.Identity)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ExchangeCodeForIdentity indicates an expected call of ExchangeCodeForIdentity.
func (mr *MockOAuth2ProviderMockRecorder) ExchangeCodeForIdentity(ctx, code, codeVerifier, nonce any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExchangeCodeForIdentity", reflect.TypeOf((*MockOAuth2Provider)(nil).ExchangeCodeForIdentity), ctx, code, codeVerifier, nonce)
}

// RefreshTokens mocks base method.
func (m *MockOAuth2Provider) RefreshTokens(ctx context.Context, refreshToken, expectedSubject string) (*upstream.Tokens, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RefreshTokens", ctx, refreshToken, expectedSubject)
	ret0, _ := ret[0].(*upstream.Tokens)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// RefreshTokens indicates an expected call of RefreshTokens.
func (mr *MockOAuth2ProviderMockRecorder) RefreshTokens(ctx, refreshToken, expectedSubject any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshTokens", reflect.TypeOf((*MockOAuth2Provider)(nil).RefreshTokens), ctx, refreshToken, expectedSubject)
}

// Type mocks base method.
func (m *MockOAuth2Provider) Type() upstream.ProviderType {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Type")
	ret0, _ := ret[0].(upstream.ProviderType)
	return ret0
}

// Type indicates an expected call of Type.
func (mr *MockOAuth2ProviderMockRecorder) Type() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockOAuth2Provider)(nil).Type))
}
