mirror of
				https://github.com/binwiederhier/ntfy.git
				synced 2025-10-31 13:02:24 +01:00 
			
		
		
		
	Add support for auth in client config
This commit is contained in:
		
							parent
							
								
									f4f5edb230
								
							
						
					
					
						commit
						b89c18e83d
					
				
					 4 changed files with 18 additions and 5 deletions
				
			
		cmd
|  | @ -162,6 +162,9 @@ func doSubscribe(c *cli.Context, cl *client.Client, conf *client.Config, topic, | |||
| 		for filter, value := range s.If { | ||||
| 			topicOptions = append(topicOptions, client.WithFilter(filter, value)) | ||||
| 		} | ||||
| 		if s.User != "" && s.Password != "" { | ||||
| 			topicOptions = append(topicOptions, client.WithBasicAuth(s.User, s.Password)) | ||||
| 		} | ||||
| 		subscriptionID := cl.Subscribe(s.Topic, topicOptions...) | ||||
| 		commands[subscriptionID] = s.Command | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 lrabane
						lrabane