test
This commit is contained in:
		
							parent
							
								
									45e36d9254
								
							
						
					
					
						commit
						d8c0f204df
					
				@ -12,6 +12,11 @@ type BasicAuth struct {
 | 
				
			|||||||
	pw   string
 | 
						pw   string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewDigestAuth creates a new instance of our Digest Authenticator
 | 
				
			||||||
 | 
					func NewBasicAuth(login, secret string) (Authenticator, error) {
 | 
				
			||||||
 | 
						return &BasicAuth{user: login, pw: secret}, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Authorize the current request
 | 
					// Authorize the current request
 | 
				
			||||||
func (b *BasicAuth) Authorize(c *http.Client, rq *http.Request, path string) error {
 | 
					func (b *BasicAuth) Authorize(c *http.Client, rq *http.Request, path string) error {
 | 
				
			||||||
	rq.SetBasicAuth(b.user, b.pw)
 | 
						rq.SetBasicAuth(b.user, b.pw)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user