// error code to STSError structure, these fields carry respective
// descriptions for all the error responses.
varstsErrCodes=stsErrorCodeMap{
ErrSTSAccessDenied:{
Code:"AccessDenied",
Description:"Generating temporary credentials not allowed for this request.",
HTTPStatusCode:http.StatusForbidden,
},
ErrSTSMissingParameter:{
Code:"MissingParameter",
Description:"A required parameter for the specified action is not supplied.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrSTSInvalidParameterValue:{
Code:"InvalidParameterValue",
Description:"An invalid or out-of-range value was supplied for the input parameter.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrSTSWebIdentityExpiredToken:{
Code:"ExpiredToken",
Description:"The web identity token that was passed is expired or is not valid. Get a new identity token from the identity provider and then retry the request.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrSTSClientGrantsExpiredToken:{
Code:"ExpiredToken",
Description:"The client grants that was passed is expired or is not valid. Get a new client grants token from the identity provider and then retry the request.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrSTSInvalidClientGrantsToken:{
Code:"InvalidClientGrantsToken",
Description:"The client grants token that was passed could not be validated by MinIO.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrSTSMalformedPolicyDocument:{
Code:"MalformedPolicyDocument",
Description:"The request was rejected because the policy document was malformed.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrSTSNotInitialized:{
Code:"STSNotInitialized",
Description:"STS API not initialized, please try again.",
HTTPStatusCode:http.StatusServiceUnavailable,
},
ErrSTSInternalError:{
Code:"InternalError",
Description:"We encountered an internal error generating credentials, please try again.",