You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suborbital lets an application's users create their own secure, sandboxed plugins, carefully isolated from the core of the system and one another. For this reason, we will create a new tenant, which is a user account with its own plugins inside Suborbital. Our application will then connect the tenant with one of its own internally-maintained users.
133
-
134
-
To create a tenant, we'll make an `HTTP POST` call:
135
+
Suborbital lets an application's users create their own secure, sandboxed plugins, carefully isolated from the core of the system and one another. For this reason, we will create a new tenant, which is a user account with its own plugins inside Suborbital. Our application will then connect the tenant with one of its own internally-maintained users. Typically, you'll want to use your system's unique ID for the user as the name of the tenant.
The SE2 plugin editor uses SE2's APIs from either [Go](./how-to/se2-go.md) or [JavaScript/TypeScript](./how-to/se2-js.md) to provide a low-friction environment for your users to write, build, test, and deploy plugins to your SE2 an instance in a single place. Alternatively, the [Builder API](https://reference.suborbital.dev/) can be used programmatically, if that better suits your use case.
180
182
181
-
### Obtain an editor token
183
+
### Obtain a session token
182
184
183
-
In addition to the `IDENTIFIER` and `ENV_TOKEN`, you’ll also need to set `NAMESPACE` and `fn` to the name of our namespace (e.g. `default`) and the name of our plugin (e.g. `hello`). Copy the `token` field in the response; this is your editor token.
185
+
To grant a user access to modify a plugin, you'll need a session token. A session token is bound to a single plugin, and you'll create new tokens each time a user needs access to a plugin. To obtain a session token:
184
186
185
187
<TabsgroupId='editor-token'>
186
188
@@ -207,7 +209,12 @@ func main() {
207
209
<TabItemvalue = "js"label = "Using JS">
208
210
209
211
```js
210
-
JS version goes here
212
+
constparams= {
213
+
tenant:"<user ID>", // the user this plugin belongs to
214
+
namespace:"<namespace>", // the plugin's namespace
-`template`: the name of the template you wish to use
247
254
-`token`: The [env token you created above](#create-an-environment)
248
-
-`ident`: The name of your environment followed by a period, followed by the name of your [tenant](./reference/glossary.md). In the example below, the environment is `dev.suborbital.user1`and the tenant's name is `user1`.
249
-
-`namespace`: the name of your namespace if different than “default”
250
-
-`fn`: the name of your plugin. In the example below, the plugin name is `hello`.
251
-
-`template`: the name of the language you wish to use (Go or JavaScript)
252
255
253
-
Altogether, it should look something like `https://editor.suborbital.network/?builder=https://your-builder.example.com&ident=dev.suborbital.user1&fn=hello&template=javascript`
256
+
Altogether, it should look something like `https://editor.suborbital.network/?template=javascript&token=<session token>`
0 commit comments