====== SF Auth ====== ===== Setup ===== To install this plug-in you have to do the following steps in the given order: - Install this plugin. - Do the "Setup at SalesForce" steps - Do the "DokuWiki Setup" steps ==== Setup at SalesForce ==== === Remote Access === - Login - Click on your name in the top toolbar - Click on ''Setup'' - Click on ''Create'' under ''App Setup'' in the left hand navigation - Click on ''Apps'' - Under "Connected Apps" click the ''New'' button - Fill Form * Connected App Name: DokuWiki * API Name: DokuWiki * Contact Email: your email address * API -> Enable OAuth Settings * 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'' * Don't enable digital signatures! * Select the following oAuth scopes: * Access and manage your data (api) * Access your basic information (id, profile, email, address, phone) * Perform requests on your behalf at any time (refresh_token, offline_access) - Configure the plugin in the configuration manager using the data given === Add custom profile Field === - Login - Click on your name in the top toolbar - Click on ''Setup'' - Click on ''Customize'' under ''App Setup'' in the left hand navigation - Click on ''Users'' - Click on ''Fields'' - Click on ''new'' in the ''User Custom Fields'' section (page bottom) - Step 1: * Picklist (Multi-Select) - Step 2: * Field Label: DokuWiki Groups * Values: enter the groups you want to assign to users * Visible Lines: whatever you like * Field Name: DokuWiki_Groups - Step 3: * keep defaults - Step 4: * keep defaults * Save You now can add Groups to your users that will be picked up by DokuWiki. DokuWiki will add the default group (configured in Dokuwiki) and the instance name (salesforce1, salesforce2, salesforce3) to theses groups automatically. ==== Owners domain ==== As username the plug-in will use the e-mail address provided by sales force. In some cases you may want to strip away the host part from the e-mail address to have nice names. To provide a unique username this feature is limited to one host. Just set the //owners domain// option to your domain. I.e.: example.com. ===== Use the wiki in a web tab ===== Just create the web tab: - Click on your name in the top toolbar - Click on ''Setup'' - Click on App Setup -> Create -> Tabs - Create a new web tab - fill out the forms important field is: ''Button or Link URL'' * 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}'' URL for ''Link URL'' https://your.wiki/path/doku.php?do=login&u=a&sessionId={!API_Session_ID}&instance={!API_Enterprise_Server_URL_240}&user={!User_ID}