{"_id":"59d04e556cddb9002626c612","project":"568bdc1483d2061900d86cdc","version":{"_id":"59a72290d61777001b6c42c3","project":"568bdc1483d2061900d86cdc","__v":19,"createdAt":"2017-08-30T20:39:44.453Z","releaseDate":"2017-08-30T20:39:44.453Z","categories":["59a7236e3fe4d90025117c10","59a72eb6cb0db3001b84cfe2","59a734eb757d030019b85af8","59c0243b1b2d07001a9d2b76","59c035e42126e10028effb12","59c06c40df5b3c0010584a13","59c1a5852cabe5002641a3e7","59c2fb00b2b45c0010b7a3d7","59c32ceb9aea850010ac4130","59c32e6e190c90003cb0d12f","59c33affb2b45c0010b7aa23","59c7dfa457bd8200105444dc","59c7e975c50cf30010d712a0","59cffdef0cd4dd0010294d54","59d0622ca91a810032c8f60c","59d06733c1aec60026253065","59d174d44ac471001a07b123","59d5a5e323e6e800103defb2","59ecf1d8ed507c001c52b255"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.0.0","version":"0"},"category":{"_id":"59cffdef0cd4dd0010294d54","project":"568bdc1483d2061900d86cdc","version":"59a72290d61777001b6c42c3","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-09-30T20:26:23.487Z","from_sync":false,"order":2,"slug":"platform-overview","title":"Platform Overview"},"user":"58cc41f21751ce2f003be3b7","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-10-01T02:09:25.197Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"# Overview\n\nThose who use the Droplit system are authenticated through their accounts, which are created through the developer portal. When a developer portal account is first created, an ecosystem and environment are created with it.\n\nAnyone who has an account must also be registered as a user.\n\nDroplit does not provide user credential management, and is not an identity provider. Developers must deploy their own authentication server, which must use the Droplit system for registration and authentication. This usually requires integrating or developing an identity provider. The server must register users with a key or token that uniquely identifies a user.\n\nIn the future, droplit.io will include an option to use third party identity providers for server-less products.\n\nIf a user is granted access to an environment, that user can make requests directly to that environment and its child resources.\n\n# Tokens\n\nTokens are used to access information in the Droplit REST API, and in the Droplit command line console. Each of these tokens can be accessed in different ways, and are used in different contexts. \n\nOnly one token should be used in an API call at a time. The documentation for each API call contains the token type required, if any, to call it successfully.\n\nTokens obtained from the Droplit portal will expire after a certain amount of time has elapsed. If this happens, login again. Select “Keep me logged in” to prevent the token from expiring. The following token types can be obtained from the portal:\n* Account\n* Server\n* User\n\nWhen authenticating in the console, the authentication token is stored in a Droplit folder in the home directory for a user: “USER_HOME_DIR/droplit.io/account.json”. This token does not expire. The following token types can be obtained from the console:\n* Authentication\n\nThe following token types can be created through the REST API:\n* Client\n* User\n\n## Account Tokens\n1. Enter the Droplit portal.\n2. Click on the account name in the top right corner.\n3. Select “Manage Account ” from the dropdown menu.\n4. Go to the “Authorization Info” section.\n5. Click the “Show” button to display the account ID and account token.\n\n## Authentication Tokens\n1. Login to the Droplit command line console.\n2. After a correct login, the console will show the authentication token, assigned to the logged in user, for reference.\n3. The token can also be accessed in the droplit.io settings folder, as described above.\n\n## Client Tokens\nUse the following REST endpoint to create client tokens:\n`POST https://ioe.droplit.io/api/clients/:id/tokens`\n\n## Server Tokens\n1. Go to the Droplit portal.\n2. Enter the “Server Keys” section on the left side of the screen.\n3. If the ecosystem already contains one or more servers, skip to step 7.\n4. Create a server by clicking the “Create a Server” button.\n5. In the dialog box that appears, enter the required information to create the server.\n6. Click the “Create Server” button. The server may take some time to create.\n7. Select a server from the list of servers in the ecosystem.\n8. Tokens are displayed under the “Tokens” section of server information.\n\n## User Tokens\n1. Go to the Droplit portal.\n2. Enter the “Users” section on the left side of the screen.\n3. If the ecosystem already contains one or more users, skip to step 7.\n4. Create a user by clicking the “Create a User” button.\n5. In the dialog box that appears, enter the required information to create the user.\n6. Click the “Create User” button. The user may take some time to create.\n7. Select a user from the list of users in the ecosystem.\n8. If the user has environment access permissions, skip to step 12.\n9. Under “Access” section, click the “New access” button.\n10. In the dialog box that appears, enter the ID of the environment for which the user should get full access.\n11. Click the “Create Access” button to create the user access.\n12. Click the “Generate Token“ button to generate the token.\n13. The token is displayed in the dialog box that appears.\n\n# Credentials\n\nDroplit supports multiple modes of authentication, which are connected to different interfaces into the system. Each mode of authentication has a unique purpose.\n\nDeveloper credentials are used in the developer portal and the Droplit command line consoles.\n\nServer credentials communicate between a client's server and the Droplit system. These credentials can be created using the developer portal. Clients have their own set of authorization tokens that can be changed over time without breaking the association to the Droplit system. Server authorization tokens are ecosystem-wide, provide unrestricted access to all ecosystem resources, and must be passed in the “authorization” header with every request. Server authorization tokens should be kept secure, and never embedded in an application where the code base could be accessed. They may be stored in a server, but storing them in a mobile application or in the client side of a web application will compromise the credentials. \n\nUser-facing applications must authenticate calls with user access tokens.","excerpt":"","slug":"authentication","type":"basic","title":"Authentication"}
# Overview Those who use the Droplit system are authenticated through their accounts, which are created through the developer portal. When a developer portal account is first created, an ecosystem and environment are created with it. Anyone who has an account must also be registered as a user. Droplit does not provide user credential management, and is not an identity provider. Developers must deploy their own authentication server, which must use the Droplit system for registration and authentication. This usually requires integrating or developing an identity provider. The server must register users with a key or token that uniquely identifies a user. In the future, droplit.io will include an option to use third party identity providers for server-less products. If a user is granted access to an environment, that user can make requests directly to that environment and its child resources. # Tokens Tokens are used to access information in the Droplit REST API, and in the Droplit command line console. Each of these tokens can be accessed in different ways, and are used in different contexts. Only one token should be used in an API call at a time. The documentation for each API call contains the token type required, if any, to call it successfully. Tokens obtained from the Droplit portal will expire after a certain amount of time has elapsed. If this happens, login again. Select “Keep me logged in” to prevent the token from expiring. The following token types can be obtained from the portal: * Account * Server * User When authenticating in the console, the authentication token is stored in a Droplit folder in the home directory for a user: “USER_HOME_DIR/droplit.io/account.json”. This token does not expire. The following token types can be obtained from the console: * Authentication The following token types can be created through the REST API: * Client * User ## Account Tokens 1. Enter the Droplit portal. 2. Click on the account name in the top right corner. 3. Select “Manage Account ” from the dropdown menu. 4. Go to the “Authorization Info” section. 5. Click the “Show” button to display the account ID and account token. ## Authentication Tokens 1. Login to the Droplit command line console. 2. After a correct login, the console will show the authentication token, assigned to the logged in user, for reference. 3. The token can also be accessed in the droplit.io settings folder, as described above. ## Client Tokens Use the following REST endpoint to create client tokens: `POST https://ioe.droplit.io/api/clients/:id/tokens` ## Server Tokens 1. Go to the Droplit portal. 2. Enter the “Server Keys” section on the left side of the screen. 3. If the ecosystem already contains one or more servers, skip to step 7. 4. Create a server by clicking the “Create a Server” button. 5. In the dialog box that appears, enter the required information to create the server. 6. Click the “Create Server” button. The server may take some time to create. 7. Select a server from the list of servers in the ecosystem. 8. Tokens are displayed under the “Tokens” section of server information. ## User Tokens 1. Go to the Droplit portal. 2. Enter the “Users” section on the left side of the screen. 3. If the ecosystem already contains one or more users, skip to step 7. 4. Create a user by clicking the “Create a User” button. 5. In the dialog box that appears, enter the required information to create the user. 6. Click the “Create User” button. The user may take some time to create. 7. Select a user from the list of users in the ecosystem. 8. If the user has environment access permissions, skip to step 12. 9. Under “Access” section, click the “New access” button. 10. In the dialog box that appears, enter the ID of the environment for which the user should get full access. 11. Click the “Create Access” button to create the user access. 12. Click the “Generate Token“ button to generate the token. 13. The token is displayed in the dialog box that appears. # Credentials Droplit supports multiple modes of authentication, which are connected to different interfaces into the system. Each mode of authentication has a unique purpose. Developer credentials are used in the developer portal and the Droplit command line consoles. Server credentials communicate between a client's server and the Droplit system. These credentials can be created using the developer portal. Clients have their own set of authorization tokens that can be changed over time without breaking the association to the Droplit system. Server authorization tokens are ecosystem-wide, provide unrestricted access to all ecosystem resources, and must be passed in the “authorization” header with every request. Server authorization tokens should be kept secure, and never embedded in an application where the code base could be accessed. They may be stored in a server, but storing them in a mobile application or in the client side of a web application will compromise the credentials. User-facing applications must authenticate calls with user access tokens.