Documentation
¶
Index ¶
Constants ¶
View Source
const ( BadRequestError = "status code 400" DocumentNotFound = "mongo: no documents in result" )
View Source
const (
StoneRealm = "stone"
)
Variables ¶
View Source
var ( HttpClient = &util.HTTPClient{} AccessTokenPayload = map[string]string{ "client_id": "", "grant_type": "client_credentials", "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", "client_assertion": "", } )
Functions ¶
func AuthenticationWithRetryOnBadRequest ¶
AuthenticationWithRetryOnBadRequest encapsulates logic for retry access token request once again in bad request status code. That's because duplicated jti returns this mencioned status code
Types ¶
type AuthResponse ¶
type AuthResponse struct { AccessToken string `json:"access_token"` AccessTokenExpiresAt int `json:"expires_in"` RefreshToken string `json:"refresh_token"` RefreshTokenCreatedAt int `json:"refresh_expires_in"` TokenType string `json:"token_type"` NotBeforePolicy int `json:"not-before-policy"` SessionState string `json:"session_state"` Scope string `json:"scope"` }
Click to show internal directories.
Click to hide internal directories.