interface

This commit is contained in:
Livio Amstutz 2019-11-28 15:29:19 +01:00
parent 80eeee2de2
commit 988a556fa9
10 changed files with 131 additions and 76 deletions

View file

@ -1,30 +0,0 @@
package oidc
type Client interface {
RedirectURIs() []string
ApplicationType() ApplicationType
LoginURL(string) string
}
// type ClientType int
// func (c ClientType) IsConvidential() bool {
// return c == ClientTypeConfidential
// }
func IsConfidentialType(c Client) bool {
return c.ApplicationType() == ApplicationTypeWeb
}
type ApplicationType int
// const (a ApplicationType)
const (
// ClientTypeConfidential ClientType = iota
// ClientTypePublic
ApplicationTypeWeb ApplicationType = iota
ApplicationTypeUserAgent
ApplicationTypeNative
)