You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
3.0 KiB
71 lines
3.0 KiB
9 years ago
|
/*
|
||
|
* Minio Cloud Storage, (C) 2015 Minio, Inc.
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*/
|
||
|
|
||
9 years ago
|
package main
|
||
9 years ago
|
|
||
|
import "errors"
|
||
|
|
||
|
// errMissingAuthHeader means that Authorization header
|
||
9 years ago
|
// has missing value or it is empty.
|
||
9 years ago
|
var errMissingAuthHeaderValue = errors.New("Missing auth header value")
|
||
|
|
||
|
// errInvalidAuthHeaderValue means that Authorization
|
||
|
// header is available but is malformed and not in
|
||
9 years ago
|
// accordance with signature v4.
|
||
9 years ago
|
var errInvalidAuthHeaderValue = errors.New("Invalid auth header value")
|
||
|
|
||
|
// errInvalidAuthHeaderPrefix means that Authorization header
|
||
9 years ago
|
// has a wrong prefix only supported value should be "AWS4-HMAC-SHA256".
|
||
9 years ago
|
var errInvalidAuthHeaderPrefix = errors.New("Invalid auth header prefix")
|
||
|
|
||
|
// errMissingFieldsAuthHeader means that Authorization
|
||
9 years ago
|
// header is available but has some missing fields.
|
||
9 years ago
|
var errMissingFieldsAuthHeader = errors.New("Missing fields in auth header")
|
||
|
|
||
|
// errMissingFieldsCredentialTag means that Authorization
|
||
9 years ago
|
// header credentials tag has some missing fields.
|
||
9 years ago
|
var errMissingFieldsCredentialTag = errors.New("Missing fields in crendential tag")
|
||
|
|
||
|
// errMissingFieldsSignedHeadersTag means that Authorization
|
||
9 years ago
|
// header signed headers tag has some missing fields.
|
||
9 years ago
|
var errMissingFieldsSignedHeadersTag = errors.New("Missing fields in signed headers tag")
|
||
|
|
||
|
// errMissingFieldsSignatureTag means that Authorization
|
||
9 years ago
|
// header signature tag has missing fields.
|
||
9 years ago
|
var errMissingFieldsSignatureTag = errors.New("Missing fields in signature tag")
|
||
|
|
||
|
// errCredentialTagMalformed means that Authorization header
|
||
9 years ago
|
// credential tag is malformed.
|
||
9 years ago
|
var errCredentialTagMalformed = errors.New("Invalid credential tag malformed")
|
||
|
|
||
|
// errInvalidRegion means that the region element from credential tag
|
||
9 years ago
|
// in Authorization header is invalid.
|
||
9 years ago
|
var errInvalidRegion = errors.New("Invalid region")
|
||
|
|
||
|
// errAccessKeyIDInvalid means that the accessKeyID element from
|
||
9 years ago
|
// credential tag in Authorization header is invalid.
|
||
9 years ago
|
var errAccessKeyIDInvalid = errors.New("AccessKeyID invalid")
|
||
9 years ago
|
|
||
|
// errUnsupportedAlgorithm means that the provided X-Amz-Algorithm is unsupported.
|
||
|
var errUnsupportedAlgorithm = errors.New("Unsupported Algorithm")
|
||
|
|
||
|
// errPolicyAlreadyExpired means that the client request carries an post policy
|
||
|
// header which is already expired.
|
||
|
var errPolicyAlreadyExpired = errors.New("Policy already expired")
|
||
|
|
||
|
// errPolicyMissingFields means that form values and policy header have some fields missing.
|
||
|
var errPolicyMissingFields = errors.New("Some fields are missing or do not match in policy")
|