use service rather than resource
This commit is contained in:
parent
515014fbeb
commit
ebae497a72
10
auth/auth.go
10
auth/auth.go
@ -12,15 +12,17 @@ type Auth interface {
|
|||||||
// Revoke an authorization token
|
// Revoke an authorization token
|
||||||
Revoke(*Token) error
|
Revoke(*Token) error
|
||||||
// Grant access to a resource
|
// Grant access to a resource
|
||||||
Grant(*Token, *Resource) error
|
Grant(*Token, *Service) error
|
||||||
// Verify a token can access a resource
|
// Verify a token can access a resource
|
||||||
Verify(*Token, *Resource) error
|
Verify(*Token, *Service) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource is some thing to provide access to
|
// Service is some thing to provide access to
|
||||||
type Resource struct {
|
type Service struct {
|
||||||
// Name of the resource
|
// Name of the resource
|
||||||
Name string
|
Name string
|
||||||
|
// Endpoint is the specific endpoint
|
||||||
|
Endpoint string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Token providers by an auth provider
|
// Token providers by an auth provider
|
||||||
|
Loading…
Reference in New Issue
Block a user