dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/clients/http/authinjector_test.go (about)

     1  //
     2  // Copyright (C) 2023 Intel Corporation
     3  //
     4  // SPDX-License-Identifier: Apache-2.0
     5  
     6  package http
     7  
     8  import (
     9  	"net/http"
    10  
    11  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/clients/interfaces"
    12  )
    13  
    14  type emptyAuthenticationInjector struct {
    15  }
    16  
    17  // NewNullAuthenticationInjector creates an instance of AuthenticationInjector
    18  func NewNullAuthenticationInjector() interfaces.AuthenticationInjector {
    19  	return &emptyAuthenticationInjector{}
    20  }
    21  
    22  func (_ *emptyAuthenticationInjector) AddAuthenticationData(_ *http.Request) error {
    23  	// Do nothing to the request; used for unit tests
    24  	return nil
    25  }