Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseSignature (0.12 sec)

  1. cmd/signature-v4-parser.go

    	if credElements[3] != "aws4_request" {
    		return ch, ErrInvalidRequestVersion
    	}
    	cred.scope.request = credElements[3]
    	return cred, ErrNone
    }
    
    // Parse signature from signature tag.
    func parseSignature(signElement string) (string, APIErrorCode) {
    	signFields := strings.Split(strings.TrimSpace(signElement), "=")
    	if len(signFields) != 2 {
    		return "", ErrMissingFields
    	}
    	if signFields[0] != "Signature" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  2. cmd/signature-v4-parser_test.go

    		{
    			inputSignElement: "Signature=abcd",
    			expectedSignStr:  "abcd",
    			expectedErrCode:  ErrNone,
    		},
    	}
    	for i, testCase := range testCases {
    		actualSignStr, actualErrCode := parseSignature(testCase.inputSignElement)
    		if testCase.expectedErrCode != actualErrCode {
    			t.Fatalf("Test %d: Expected the APIErrCode to be %d, got %d", i+1, testCase.expectedErrCode, actualErrCode)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 27.4K bytes
    - Viewed (0)
Back to top