Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- type Servicer
- type ServicerWithMetrics
- func (_d ServicerWithMetrics) Health() (hp1 *health.Health, err error)
- func (_d ServicerWithMetrics) Identity(token string) (s1 string, err error)
- func (_d ServicerWithMetrics) Ready() (err error)
- func (_d ServicerWithMetrics) Token() (s1 string, err error)
- func (_d ServicerWithMetrics) Validate(token string) (err error)
- type Token
- type TokenIdentity
Constants ¶
const ( // ClientIDKey is the key for the property client id. ClientIDKey = "client_id" // ClientSecretKey is the key for the property client secret. ClientSecretKey = "client_secret" )
const (
// ServiceName is the name of the service
ServiceName = "iam-proxy"
)
Variables ¶
var ( // ErrInvalidDomain is the error when the domain provided is invalid. ErrInvalidDomain = errors.New("invalid domain") // ErrInvalidPort is the error when the port provided is invalid. ErrInvalidPort = errors.New("invalid port") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client implements the service logic by making http requests to the server.
func (*Client) Identity ¶
Identity calls the iam service and validates the given token while returning the identity information e.g. claims subject.
type Servicer ¶
type Servicer interface { Health() (*health.Health, error) Ready() error Token() (string, error) Validate(token string) error Identity(token string) (string, error) }
Servicer defines the interface for interacting with the server.
func NewWithMetrics ¶
NewWithMetrics returns an instance of the Servicer decorated with metrics
type ServicerWithMetrics ¶
type ServicerWithMetrics struct {
// contains filtered or unexported fields
}
ServicerWithMetrics implements Servicer interface with all methods wrapped with metrics
func (ServicerWithMetrics) Health ¶
func (_d ServicerWithMetrics) Health() (hp1 *health.Health, err error)
Health implements Servicer
func (ServicerWithMetrics) Identity ¶
func (_d ServicerWithMetrics) Identity(token string) (s1 string, err error)
Identity implements Servicer
func (ServicerWithMetrics) Ready ¶
func (_d ServicerWithMetrics) Ready() (err error)
Ready implements Servicer
func (ServicerWithMetrics) Token ¶
func (_d ServicerWithMetrics) Token() (s1 string, err error)
Token implements Servicer
func (ServicerWithMetrics) Validate ¶
func (_d ServicerWithMetrics) Validate(token string) (err error)
Validate implements Servicer
type Token ¶
type Token struct { TokenType string `json:"tokenType"` AccessToken string `json:"accessToken"` IdentityToken string `json:"identityToken"` ExpiresIn int64 `json:"expiresIn"` ExtExpiresIn int64 `json:"extExpiresIn"` }
Token for IAM verification swagger:model token
type TokenIdentity ¶
type TokenIdentity struct {
Identity string `json:"identity"`
}
TokenIdentity for getting the IAM token identity swagger:model tokenIdentity