Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for getRequestAuthType (0.27 sec)

  1. cmd/generic-handlers_contrib.go

    func guessIsLoginSTSReq(req *http.Request) bool {
    	if req == nil {
    		return false
    	}
    	return strings.HasPrefix(req.URL.Path, loginPathPrefix) ||
    		(req.Method == http.MethodPost && req.URL.Path == SlashSeparator &&
    			getRequestAuthType(req) == authTypeSTS)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 30 15:50:39 GMT 2021
    - 995 bytes
    - Viewed (0)
  2. cmd/generic-handlers.go

    	minioReservedBucket     = "minio"
    	minioReservedBucketPath = SlashSeparator + minioReservedBucket
    
    	loginPathPrefix = SlashSeparator + "login"
    )
    
    func guessIsBrowserReq(r *http.Request) bool {
    	aType := getRequestAuthType(r)
    	return strings.Contains(r.Header.Get("User-Agent"), "Mozilla") &&
    		globalBrowserEnabled && aType == authTypeAnonymous
    }
    
    func setBrowserRedirectMiddleware(h http.Handler) http.Handler {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 01:08:52 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  3. cmd/s3-zip-handlers.go

    	// type to return the correct error (NoSuchKey vs AccessDenied)
    	if s3Error := checkRequestAuthType(ctx, r, policy.GetObjectAction, bucket, zipPath); s3Error != ErrNone {
    		if getRequestAuthType(r) == authTypeAnonymous {
    			// As per "Permission" section in
    			// https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html
    			// If the object you request does not exist,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 09 10:41:25 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  4. cmd/auth-handler.go

    	authTypeSigned
    	authTypeSignedV2
    	authTypeJWT
    	authTypeSTS
    	authTypeStreamingSignedTrailer
    	authTypeStreamingUnsignedTrailer
    )
    
    // Get request authentication type.
    func getRequestAuthType(r *http.Request) (at authType) {
    	if r.URL != nil {
    		var err error
    		r.Form, err = url.ParseQuery(r.URL.RawQuery)
    		if err != nil {
    			authNLogIf(r.Context(), err)
    			return authTypeUnknown
    		}
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  5. cmd/bucket-policy.go

    	}
    
    	vid := r.Form.Get(xhttp.VersionID)
    	if vid == "" {
    		if u, err := url.Parse(r.Header.Get(xhttp.AmzCopySource)); err == nil {
    			vid = u.Query().Get(xhttp.VersionID)
    		}
    	}
    
    	authType := getRequestAuthType(r)
    	var signatureVersion string
    	switch authType {
    	case authTypeSignedV2, authTypePresignedV2:
    		signatureVersion = signV2Algorithm
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 8K bytes
    - Viewed (0)
  6. cmd/object-handlers.go

    	srcInfo.UserDefined = objectlock.FilterObjectLockMetadata(srcInfo.UserDefined, true, true)
    	retPerms := isPutActionAllowed(ctx, getRequestAuthType(r), dstBucket, dstObject, r, policy.PutObjectRetentionAction)
    	holdPerms := isPutActionAllowed(ctx, getRequestAuthType(r), dstBucket, dstObject, r, policy.PutObjectLegalHoldAction)
    	getObjectInfo := objectAPI.GetObjectInfo
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 125K bytes
    - Viewed (0)
  7. cmd/object-multipart-handlers.go

    		metadata[ReservedMetadataPrefixLower+ReplicaTimestamp] = UTCNow().Format(time.RFC3339Nano)
    	}
    	retPerms := isPutActionAllowed(ctx, getRequestAuthType(r), bucket, object, r, policy.PutObjectRetentionAction)
    	holdPerms := isPutActionAllowed(ctx, getRequestAuthType(r), bucket, object, r, policy.PutObjectLegalHoldAction)
    
    	getObjectInfo := objectAPI.GetObjectInfo
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  8. cmd/auth-handler_test.go

    				},
    				Method: http.MethodPost,
    				Body:   nopCloser,
    			},
    			authT: authTypePostPolicy,
    		},
    	}
    
    	// .. Tests all request auth type.
    	for i, testc := range testCases {
    		authT := getRequestAuthType(testc.req)
    		if authT != testc.authT {
    			t.Errorf("Test %d: Expected %d, got %d", i+1, testc.authT, authT)
    		}
    	}
    }
    
    // Test all s3 supported auth types.
    func TestS3SupportedAuthType(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 15.4K bytes
    - Viewed (0)
Back to top