Documentation ¶
Index ¶
- Constants
- Variables
- func MakeAuthorityAuthorizationMiddleware(authority string, logger log.Logger) endpoint.Middleware
- func MakeCheckTokenEndpoint(svc service.TokenService) endpoint.Endpoint
- func MakeClientAuthorizationMiddleware(logger log.Logger) endpoint.Middleware
- func MakeHealthCheckEndpoint(svc service.Service) endpoint.Endpoint
- func MakeOAuth2AuthorizationMiddleware(logger log.Logger) endpoint.Middleware
- func MakeTokenEndpoint(svc service.TokenGranter, clientService service.ClientDetailsService) endpoint.Endpoint
- type AdminRequest
- type AdminResponse
- type CheckTokenRequest
- type CheckTokenResponse
- type HealthRequest
- type HealthResponse
- type OAuth2Endpoints
- type SimpleRequest
- type SimpleResponse
- type TokenRequest
- type TokenResponse
Constants ¶
View Source
const ( OAuth2DetailsKey = "OAuth2Details" OAuth2ClientDetailsKey = "OAuth2ClientDetails" OAuth2ErrorKey = "OAuth2Error" )
Variables ¶
Functions ¶
func MakeAuthorityAuthorizationMiddleware ¶
func MakeAuthorityAuthorizationMiddleware(authority string, logger log.Logger) endpoint.Middleware
func MakeCheckTokenEndpoint ¶
func MakeCheckTokenEndpoint(svc service.TokenService) endpoint.Endpoint
func MakeClientAuthorizationMiddleware ¶
func MakeClientAuthorizationMiddleware(logger log.Logger) endpoint.Middleware
func MakeHealthCheckEndpoint ¶
MakeHealthCheckEndpoint 创建健康检查Endpoint
func MakeOAuth2AuthorizationMiddleware ¶
func MakeOAuth2AuthorizationMiddleware(logger log.Logger) endpoint.Middleware
func MakeTokenEndpoint ¶
func MakeTokenEndpoint(svc service.TokenGranter, clientService service.ClientDetailsService) endpoint.Endpoint
make endpoint
Types ¶
type AdminRequest ¶
type AdminRequest struct { }
type AdminResponse ¶
type CheckTokenRequest ¶
type CheckTokenRequest struct { Token string ClientDetails model.ClientDetails }
type CheckTokenResponse ¶
type CheckTokenResponse struct { OAuthDetails *model.OAuth2Details `json:"o_auth_details"` Error string `json:"error"` }
type HealthResponse ¶
type HealthResponse struct {
Status bool `json:"status"`
}
HealthResponse 健康检查响应结构
type OAuth2Endpoints ¶
type OAuth2Endpoints struct { TokenEndpoint endpoint.Endpoint CheckTokenEndpoint endpoint.Endpoint GRPCCheckTokenEndpoint endpoint.Endpoint HealthCheckEndpoint endpoint.Endpoint }
CalculateEndpoint define endpoint
type SimpleRequest ¶
type SimpleRequest struct { }
type SimpleResponse ¶
type TokenRequest ¶
type TokenResponse ¶
type TokenResponse struct { AccessToken *model.OAuth2Token `json:"access_token"` Error string `json:"error"` }
Click to show internal directories.
Click to hide internal directories.