CreateClientUsers
struct CreateClientUsers : AsyncMigrationA Migration that creates a set of registered client users during startup, from a
registered-clients.txt file located in the seeds/ subdirectory of the project. The file
must be of the format:
clientUsername1:password1:recoveryKey1 clientUsername2:password2:recoveryKey2 …
Note
Each API client that wishes to make use ofClientController endpoints must
provide a client username:password:recovery key triplet prior to production startup.
- 
                  
                  DeclarationSwift struct ClientUserData
- 
                  prepare(on:Asynchronous) Required by Migrationprotocol. Reads either a test or production text file in theseeds/subdirectory, converts the lines into elements of an array, then iterates over them to create newUsermodels withUserAccessLevelof.client.Requires registered-clients.txtfile in seeds subdirectory.DeclarationSwift func prepare(on database: Database) async throwsParametersconnA connection to the database, provided automatically. Return ValueVoid. 
- 
                  revert(on:Asynchronous) Required by Migrationprotocol, but this isn’t a model update, so just return a pre-completedFuture.DeclarationSwift func revert(on database: Database) async throwsParametersconnThe database connection. Return ValueVoid. 
- 
                  
                  DeclarationSwift func getClients() -> [ClientUserData]
 View on GitHub
            View on GitHub
           CreateClientUsers Structure Reference
      CreateClientUsers Structure Reference