renaming, mocking and begin tests

This commit is contained in:
Livio Amstutz 2019-11-22 08:33:16 +01:00
parent 3d5de74d02
commit 85b71e0867
14 changed files with 309 additions and 18 deletions

View file

@ -1,7 +1,24 @@
package server
package op
import "github.com/caos/oidc/pkg/oidc"
type Storage interface {
CreateAuthRequest(*oidc.AuthRequest) error
GetClientByClientID(string) (Client, error)
}
type Client interface {
RedirectURIs() []string
Type() ClientType
}
type ClientType int
func (c ClientType) IsConvidential() bool {
return c == ClientTypeConfidential
}
const (
ClientTypeConfidential ClientType = iota
ClientTypePublic
)