A Salesforce Community is required to host the deployment of CYM-Identity.
The community serves the ApexPages and the ApexRest resources which are built by CYM-Identity.
The Community also allows you to control who can or cannot use the applications which you'll create in the next chapters.
Make sure that your community is Live/Active
This step must be done by an administrator who can create Remote Site Settings and Connected Apps
onboard a community- Open the CYM-Identity App > Communities Tab > New
- Choose the community from the list which is displayed. If you don't see the community in the list, make sure that the community is Live/Active. CYM-Identity will provision all required objects and metadata for your community.
- All Auth. Providers & SAML Providers configured on the community will be created and configured
- Once requested, you can enter the name of your first Realm.
- You can skip this step by clicking on Submit
- If you enter a Realm name, CYM-Identity will create some sample data to get you started
- One Web App & one Native App
- A resource server managed by the Realm
- A resource server which manages resources on your Salesforce Community (Dynamic Client Registration endpoint for example)
- Policies (ACRs) which force MFA on specific applications
At the end of this step, you'll be redirected to the community record page.
Now that you have a community ready, you need to configure the site linked to your community.
You'll also have to assign a CYM-Identity License to your Site's guest user.
You can use Setup the URL Rewriter
link to quickly jump to your Site configuration page
site url rewriter configurationYou can Edit
the site and select the cym.URLRewriter
class from the package.
You will need a developer to programatically call the URLRewriter
Here's an example implementation
MyCustomRewriter.cls
1global class MyCustomRewriter implements Site.UrlRewriter {
2 global PageReference[] generateUrlFor(PageReference[] salesforceUrls) {
3 PageReference[] results = new PageReference[] {};
4 cym.URLRewriter cymURLRewriter = new cym.URLRewriter();
5 for (PageReference pr : salesforceUrls) {
6 PageReference cymPageReference = cymURLRewriter.generateUrlFor(pr);
7 if (cymPageReference != pr) {
8
9 results.add(cymPageReference);
10 continue;
11 }
12
13 }
14 return results;
15 }
16 global PageReference mapRequestUrl(PageReference userFriendlyPage) {
17 cym.URLRewriter cymURLRewriter = new cym.URLRewriter();
18 PageReference cymPageReference = cymURLRewriter.mapRequestUrl(userFriendlyPage);
19 if (cymPageReference != userFriendlyPage) return cymPageReference;
20
21 }
22}