Documentation ¶
Index ¶
Constants ¶
const ( // DefaultApigeeHost is Apigee's default api endpoint host DefaultApigeeHost = "https://api.enterprise.apigee.com/" // EnvVarApigeeHost is the Env Var to set overide default apigee api host EnvVarApigeeHost = "AUTH_API_HOST" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApigeeJWTToken ¶
type ApigeeJWTToken struct {
// contains filtered or unexported fields
}
ApigeeJWTToken the apigee impelmentation of the JWT token auth sdk
func (*ApigeeJWTToken) GetEmail ¶
func (token *ApigeeJWTToken) GetEmail() string
GetEmail return the username if possible for the subject
func (*ApigeeJWTToken) GetSubject ¶
func (token *ApigeeJWTToken) GetSubject() string
GetSubject get the subject claim from the token
func (*ApigeeJWTToken) GetUsername ¶
func (token *ApigeeJWTToken) GetUsername() string
GetUsername return the username if possible for the subject
func (*ApigeeJWTToken) IsOrgAdmin ¶
func (token *ApigeeJWTToken) IsOrgAdmin(orgName string) (bool, error)
IsOrgAdmin is the current JWTToken subject an organization admin. If so return true, if not, return false. An error is returned if the check cannot be performed
type JWTToken ¶
type JWTToken interface { //GetSubject get the subject claim from the token GetSubject() string //GetUsername return the username if possible for the subject GetUsername() string //GetEmail return the username if possible for the subject GetEmail() string //IsOrgAdmin is the current JWTToken subject an organization admin. If so return true, if not, return false. An error is returned if the check cannot be performed IsOrgAdmin(orgName string) (bool, error) }
JWTToken the interface for permissions client
func NewApigeeJWTToken ¶
NewApigeeJWTToken create a new Apigee JWT token. Return the instance or an error if one cannot be created
func NewJWTToken ¶
NewJWTToken creates a new JWT token based on the environment configuration
func NewJWTTokenFromRequest ¶
NewJWTTokenFromRequest create and return our JWTToken impl from the http request
func NewTestToken ¶
NewTestToken create a new Apigee JWT token. Return the instance or an error if one cannot be created
type TestJWTToken ¶
type TestJWTToken struct {
// contains filtered or unexported fields
}
TestJWTToken the apigee impelmentation of the JWT token auth sdk
func (*TestJWTToken) GetEmail ¶
func (token *TestJWTToken) GetEmail() string
GetEmail return the username if possible for the subject
func (*TestJWTToken) GetSubject ¶
func (token *TestJWTToken) GetSubject() string
GetSubject get the subject claim from the token
func (*TestJWTToken) GetUsername ¶
func (token *TestJWTToken) GetUsername() string
GetUsername return the username if possible for the subject
func (*TestJWTToken) IsOrgAdmin ¶
func (token *TestJWTToken) IsOrgAdmin(orgName string) (bool, error)
IsOrgAdmin is the current JWTToken subject an organization admin. If so return true, if not, return false. An error is returned if the check cannot be performed