Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthenticatedAdmin = &SimpleAuthenticator{ admin: true, authorizedSpaceGUIDs: []string{}, }
View Source
var AuthenticatedNonAdmin = &SimpleAuthenticator{ admin: false, authorizedSpaceGUIDs: []string{ "space_guid", "space_guid1", "space_guid2", "00000001-0001-0000-0000-000000000000", "00000001-0002-0000-0000-000000000000", "00000001-0003-0000-0000-000000000000", "00000002-0001-0000-0000-000000000000", "00000002-0002-0000-0000-000000000000", "00000003-0005-0000-0000-000000000000", "o1s1", "o2s1", }, }
View Source
var FakeBearerToken = "Bearer FAKE_TOKEN"
View Source
var NonAuthenticated = &SimpleAuthenticator{ admin: false, authorizedSpaceGUIDs: []string{}, authorizationError: nil, }
Functions ¶
func CreateConfigFromEnv ¶
Types ¶
type Authenticator ¶
type Claims ¶
type Claims struct { Val string `json:"val"` jwt.StandardClaims }
type ClientAuthorizer ¶
type ClientAuthorizer struct {
// contains filtered or unexported fields
}
func (*ClientAuthorizer) Admin ¶
func (a *ClientAuthorizer) Admin() (bool, error)
func (*ClientAuthorizer) Spaces ¶
func (a *ClientAuthorizer) Spaces() ([]string, error)
type SimpleAuthenticator ¶
type SimpleAuthenticator struct {
// contains filtered or unexported fields
}
func (*SimpleAuthenticator) Authorize ¶
func (sa *SimpleAuthenticator) Authorize(c echo.Context) error
func (*SimpleAuthenticator) Exchange ¶
func (sa *SimpleAuthenticator) Exchange(c echo.Context) error
func (*SimpleAuthenticator) NewAuthorizer ¶
func (sa *SimpleAuthenticator) NewAuthorizer(token string) (Authorizer, error)
type SimpleAuthorizer ¶
type SimpleAuthorizer struct {
// contains filtered or unexported fields
}
func (*SimpleAuthorizer) Admin ¶
func (sa *SimpleAuthorizer) Admin() (bool, error)
func (*SimpleAuthorizer) Spaces ¶
func (sa *SimpleAuthorizer) Spaces() ([]string, error)
type UAA ¶
func (*UAA) NewAuthorizer ¶
func (uaa *UAA) NewAuthorizer(token string) (Authorizer, error)
Click to show internal directories.
Click to hide internal directories.