Enable Trust Network on Petstore

1. Go to “Trust_Network” tab, click down arror of “PetstoreUserActivation” and copy the “Visual Force component to include in force.com Page”:

trust-petstore-1

2. Paste content into “Petstore_UserActivationPolicy” VisualForce Page, and Save it:

trust-petstore-2

3. Go back to “Trust_Network” tab,  click down arrorw of “PetstoreTwoFactor” policy and copy the selected content as the following:

trust-petstore-8

4. Paste the policy into the “Petstore_TwoFactorAuthPolicy” VisualForce Page, and Save it:

trust-petstore-9

5. Go to “PetstoreBaseController” Apex Class, and modify the section between comments of “Enable Trust Network”:

trust-petstore-5

6.  After the edit, it should look like these:

trust-petstore-7

7.  The Policy Name from above, should be copied from “PetstoreTwoFactor” policy:

trust-petstore-6

8. If you are using VF tab to host petstore, no further configuration needed.  For using petstore as a force.com site,  you need to enable public access for the following additional components:

a) Add trust_network.TNaaS controller to the “Apex Class Access”

trust-post-1

 

b) Add <Policy>_Login, <Policy>_Logout and <Policy>_PostEval to the “Visualforce Page Access”

trust-post-2

9.  If you have signed up users from pre trust-enabled version,  make sure to set the Petstore_User__c.Activation__c field to 1 or delete those users and redo the sign ups.


-- Download Enable Trust Network on Petstore as PDF --