MCPcopy Index your code
hub / github.com/writefreely/writefreely / Config

Method Config

oauth_test.go:78–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78func (m *MockOAuthDatastoreProvider) Config() *config.Config {
79 if m.DoConfig != nil {
80 return m.DoConfig()
81 }
82 cfg := config.New()
83 cfg.UseSQLite(true)
84 cfg.WriteAsOauth = config.WriteAsOauthCfg{
85 ClientID: "development",
86 ClientSecret: "development",
87 AuthLocation: "https://write.as/oauth/login",
88 TokenLocation: "https://write.as/oauth/token",
89 InspectLocation: "https://write.as/oauth/inspect",
90 }
91 cfg.SlackOauth = config.SlackOauthCfg{
92 ClientID: "development",
93 ClientSecret: "development",
94 TeamID: "development",
95 }
96 return cfg
97}
98
99func (m *MockOAuthDatastore) ValidateOAuthState(ctx context.Context, state string) (string, string, int64, string, error) {
100 if m.DoValidateOAuthState != nil {

Callers 2

TestViewOauthInitFunction · 0.95
TestViewOauthCallbackFunction · 0.95

Calls 2

NewFunction · 0.92
UseSQLiteMethod · 0.80

Tested by

no test coverage detected