Documentation ¶
Overview ¶
Package api IAM API
Simple IAM verification procedure for OAuth2 authentication cycles. Generates a token for a valid user with expiration time, and provides functionality for the validation of tokens.
Schemes: http, https Host: localhost:8080 BasePath: /iam/v1 Version: APP_VERSION_AUTOGENERATED Produces: - application/json
swagger:meta
Index ¶
- type Client
- func (cl *Client) Health(c *gin.Context)
- func (cl *Client) Identity(c *gin.Context)
- func (cl *Client) ListenAndServe() error
- func (cl *Client) Ready(c *gin.Context)
- func (cl *Client) Shutdown(ctx context.Context) error
- func (cl *Client) Token(c *gin.Context)
- func (cl *Client) Validate(c *gin.Context)
- type Config
- type Server
- type ServerWithMetrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for REST API
func (*Client) Health ¶
Health swagger:route GET /health health
Responds to health checks. Produces: - application/json Responses: 200: body:health 500: 503:
func (*Client) Identity ¶
swagger:route POST /oauth2/identity identity
Responds with the subject embedded in the token claims, if there is one. If the token is invalid, an error is returned.
Produces: - application/json Responses: 200: body:tokenIdentity 400: 401:
func (*Client) ListenAndServe ¶
ListenAndServe long-running process that listens and accepts incoming requests
func (*Client) Ready ¶
Ready swagger:route GET /ready ready
Responds with 200 when service is ready to accept requests. Responses: 200: 503:
func (*Client) Token ¶
swagger:route POST /oauth2/token token
Responds with an access token.
Produces: - application/json Responses: 200: body:token 400: 401:
Example: $ curl -d "client_id=<your-client-id>&client_secret=<your-client-secret>&grant_type=client_credentials" https://<domain>/iam/v1/oauth2/token
type Server ¶
Server describes the methods needed to interact with this package interface.
func NewWithMetrics ¶
NewWithMetrics returns an instance of the Server decorated with metrics
type ServerWithMetrics ¶
type ServerWithMetrics struct {
// contains filtered or unexported fields
}
ServerWithMetrics implements Server interface with all methods wrapped with metrics
func (ServerWithMetrics) ListenAndServe ¶
func (_d ServerWithMetrics) ListenAndServe() (err error)
ListenAndServe implements Server