1====== SF Auth ====== 2 3===== Setup ===== 4 5To install this plug-in you have to do the following steps in the given order: 6 - Install this plugin. 7 - Do the "Setup at SalesForce" steps 8 - Do the "DokuWiki Setup" steps 9 10==== Setup at SalesForce ==== 11 12=== Remote Access === 13 - Login 14 - Click on your name in the top toolbar 15 - Click on ''Setup'' 16 - Click on ''Create'' under ''App Setup'' in the left hand navigation 17 - Click on ''Apps'' 18 - Under "Connected Apps" click the ''New'' button 19 - Fill Form 20 * Connected App Name: DokuWiki 21 * API Name: DokuWiki 22 * Contact Email: your email address 23 * API -> Enable OAuth Settings 24 * Callback URL - see DokuWiki's config manager. Should be something like ''http://example.com/dokuwiki/doku.php?do=login&u=sf&p=sf&sf=1'' 25 * Don't enable digital signatures! 26 * Select the following oAuth scopes: 27 * Access and manage your data (api) 28 * Access your basic information (id, profile, email, address, phone) 29 * Perform requests on your behalf at any time (refresh_token, offline_access) 30 - Configure the plugin in the configuration manager using the data given 31 32=== Add custom profile Field === 33 34 - Login 35 - Click on your name in the top toolbar 36 - Click on ''Setup'' 37 - Click on ''Customize'' under ''App Setup'' in the left hand navigation 38 - Click on ''Users'' 39 - Click on ''Fields'' 40 - Click on ''new'' in the ''User Custom Fields'' section (page bottom) 41 - Step 1: 42 * Picklist (Multi-Select) 43 - Step 2: 44 * Field Label: DokuWiki Groups 45 * Values: enter the groups you want to assign to users 46 * Visible Lines: whatever you like 47 * Field Name: DokuWiki_Groups 48 - Step 3: 49 * keep defaults 50 - Step 4: 51 * keep defaults 52 * Save 53 54You now can add Groups to your users that will be picked up by DokuWiki. DokuWiki will add the default group (configured in Dokuwiki) 55and the instance name (salesforce1, salesforce2, salesforce3) to theses groups automatically. 56 57 58==== Owners domain ==== 59As username the plug-in will use the e-mail address provided by sales force. 60In some cases you may want to strip away the host part from the e-mail address to have 61nice names. To provide a unique username this feature is limited to one host. 62Just set the //owners domain// option to your domain. I.e.: example.com. 63 64===== Use the wiki in a web tab ===== 65 66Just create the web tab: 67 68 - Click on your name in the top toolbar 69 - Click on ''Setup'' 70 - Click on App Setup -> Create -> Tabs 71 - Create a new web tab 72 - fill out the forms important field is: ''Button or Link URL'' 73 * You need to fill in what you configured for the callback URL above, but add ''&sessionId={!API_Session_ID}&instance={!API_Enterprise_Server_URL_240}&user={!User_ID}'' to it. Eg. ''http://example.com/dokuwiki/doku.php?do=login&u=sf&p=sf&sf=1&sessionId={!API_Session_ID}&instance={!API_Enterprise_Server_URL_240}&user={!User_ID}'' 74URL for ''Link URL'' 75 https://your.wiki/path/doku.php?do=login&u=a&sessionId={!API_Session_ID}&instance={!API_Enterprise_Server_URL_240}&user={!User_ID} 76