interface
This commit is contained in:
parent
80eeee2de2
commit
988a556fa9
10 changed files with 131 additions and 76 deletions
30
pkg/op/u/client.go
Normal file
30
pkg/op/u/client.go
Normal file
|
@ -0,0 +1,30 @@
|
|||
package u
|
||||
|
||||
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
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue