AppSuite:Embedding your settings into AppSuite settings: Difference between revisions
(Created page with "''Synopsys:'' This article explains how you can embed your own configuration page via iFrame into the AppSuite's settings and pass our session onto your implementation. This i...") |
No edit summary |
||
Line 3: | Line 3: | ||
__TOC__ | __TOC__ | ||
== Declare the page you want to embed == | |||
You can declare pages to embed via [[Config Cascade]] settings. There are several ways to do so, this example uses the most comfortable one, a YAML declaration: | You can declare pages to embed via [[Config Cascade]] settings. There are several ways to do so, this example uses the most comfortable one, a YAML declaration: | ||
Line 19: | Line 21: | ||
* '''title''': The title as to be seen on the settings page. | * '''title''': The title as to be seen on the settings page. | ||
* '''after''', '''before''' or '''index''': Where the page is supposed to be positioned. ''Hint:'' If you want to name a page as reference (as opposed to using the index), you need to figure out the name. One way to do so is go to that page in the settings and check for the id parameter in the URL. | * '''after''', '''before''' or '''index''': Where the page is supposed to be positioned. ''Hint:'' If you want to name a page as reference (as opposed to using the index), you need to figure out the name. One way to do so is go to that page in the settings and check for the id parameter in the URL. | ||
== Create a secret == | |||
Now you just need to declare the app your are about to embed in the backend and you are good to go: | Now you just need to declare the app your are about to embed in the backend and you are good to go: | ||
Line 34: | Line 39: | ||
This secret, combined with the token, can be traded for a login. | This secret, combined with the token, can be traded for a login. | ||
== Redeem a token == | |||
GET /login?action=redeemToken | GET /login?action=redeemToken | ||
Line 41: | Line 49: | ||
This request can be sent by the embedded app to the AppSuite backend to get authorisation info. | This request can be sent by the embedded app to the AppSuite backend to get authorisation info. | ||
[[Category:AppSuite]] | [[Category:AppSuite]] |
Revision as of 10:07, 26 August 2013
Synopsys: This article explains how you can embed your own configuration page via iFrame into the AppSuite's settings and pass our session onto your implementation. This is a replacement for "Config Jump" of OX6.
Declare the page you want to embed
You can declare pages to embed via Config Cascade settings. There are several ways to do so, this example uses the most comfortable one, a YAML declaration:
➜ configjump.yml io.ox/settings/configjump//changePlans: url: "<http://localhost/~fla/changePlans.php?token=[token> ]" title: “Change Plan” after: "io.ox/mail"
io.ox/settings/configjump contains one object per embedded page (e.g. "changePlans"). If you want to add more pages, follow this pattern.
An object of this type has the following properties:
- url: The URL to be branched to. The place holder [token] will be replaced by the token you get from the token login system
- title: The title as to be seen on the settings page.
- after, before or index: Where the page is supposed to be positioned. Hint: If you want to name a page as reference (as opposed to using the index), you need to figure out the name. One way to do so is go to that page in the settings and check for the id parameter in the URL.
Create a secret
Now you just need to declare the app your are about to embed in the backend and you are good to go:
➜ cat tokenlogin-secrets # # Listing of known Web Application secrets followed by an optional semicolon-separated parameter list # # e.g. 1254654698621354; accessPasword=true # # Dummy entry # 1234-56789-98765-4321; accessPassword=true 12345-phpapp-54321
This secret, combined with the token, can be traded for a login.
Redeem a token
GET /login?action=redeemToken
- token: The token you want to trade.
- secret: A valid secret for your app.
This request can be sent by the embedded app to the AppSuite backend to get authorisation info.