-
-
Notifications
You must be signed in to change notification settings - Fork 348
/
provider.go
56 lines (41 loc) · 1.26 KB
/
provider.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
package configuration
import (
"encoding/json"
"net/url"
"time"
"github.com/gobuffalo/packr/v2"
"github.com/sirupsen/logrus"
"github.com/ory/fosite"
"github.com/rs/cors"
)
var schemas = packr.New("schemas", "../../.schemas")
type Provider interface {
CORSEnabled(iface string) bool
CORSOptions(iface string) cors.Options
ProviderAuthenticators
ProviderAuthorizers
ProviderMutators
ProxyReadTimeout() time.Duration
ProxyWriteTimeout() time.Duration
ProxyIdleTimeout() time.Duration
AccessRuleRepositories() []url.URL
ProxyServeAddress() string
APIServeAddress() string
ToScopeStrategy(value string, key string) fosite.ScopeStrategy
ParseURLs(sources []string) ([]url.URL, error)
JSONWebKeyURLs() []string
}
type ProviderAuthenticators interface {
AuthenticatorConfig(id string, overrides json.RawMessage, destination interface{}) error
AuthenticatorIsEnabled(id string) bool
}
type ProviderAuthorizers interface {
AuthorizerConfig(id string, overrides json.RawMessage, destination interface{}) error
AuthorizerIsEnabled(id string) bool
}
type ProviderMutators interface {
MutatorConfig(id string, overrides json.RawMessage, destination interface{}) error
MutatorIsEnabled(id string) bool
}
func MustValidate(l logrus.FieldLogger, p Provider) {
}