mirror of
				https://github.com/photoprism/photoprism.git
				synced 2025-11-01 04:32:49 +08:00 
			
		
		
		
	You can now run "photoprism auth add" to create new client access tokens that allow external applications to use the built-in REST API. Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
		
							
								
								
									
										25
									
								
								internal/commands/auth.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								internal/commands/auth.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| package commands | ||||
|  | ||||
| import ( | ||||
| 	"github.com/urfave/cli" | ||||
| ) | ||||
|  | ||||
| // AuthCommands registers the API authentication subcommands. | ||||
| var AuthCommands = cli.Command{ | ||||
| 	Name:    "auth", | ||||
| 	Aliases: []string{"sess"}, | ||||
| 	Usage:   "API authentication subcommands", | ||||
| 	Subcommands: []cli.Command{ | ||||
| 		AuthListCommand, | ||||
| 		AuthAddCommand, | ||||
| 		AuthShowCommand, | ||||
| 		AuthRemoveCommand, | ||||
| 		AuthClearCommand, | ||||
| 	}, | ||||
| } | ||||
|  | ||||
| // tokensFlag represents a CLI flag to include tokens in a report. | ||||
| var tokensFlag = cli.BoolFlag{ | ||||
| 	Name:  "tokens", | ||||
| 	Usage: "show preview and download tokens", | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Michael Mayer
					Michael Mayer