-
Notifications
You must be signed in to change notification settings - Fork 2
Portal instance declaration
Benoit Orihuela edited this page Apr 30, 2022
·
2 revisions
- create a new entry in the
confs
map:
confs:
[...]
myportal:
isDefaultConf: false
baseUrl: https://<portal domain name>
baseImageUrl: ${confs.myportal.baseUrl}/media
defaultIconUrl: ${confs.myportal.baseUrl}/img/noicon.png
web:
googleTag: UA-111222333-1
home: https://www.somewebsite.fr
sitemap:
url_footer: ${confs.myportal.web.home}/footer.json
kernel:
client_id: <portal instance id>
client_secret: <portal instance secret generated some steps below>
callback_uri: ${confs.myportal.baseUrl}/callback
post_logout_redirect_uri: ${confs.myportal.baseUrl}/fr/store
home_uri: ${confs.myportal.baseUrl}
error_401_uri: ${confs.myportal.baseUrl}/my
datacore:
adminUserRefreshToken: <refresh token for this portal instance>
nonce: changeit
opendata:
url: https://opendata.somedomain.fr
Do not remove the web.googleTag
key even if it is not used as it prevents app from loading if unset
- generate (and customize if needed) the translations for the new instance (cf https://github.com/ozwillo/ozwillo-portal/wiki/Customize-translations)
Mongo :
- insert a document in
style_properties
collection (cf https://github.com/ozwillo/ozwillo-portal/wiki/Theming for more details):
{
"styleProperties": [
{
"key": "--primary-color",
"value": "#0072b4"
},
{
"key": "--secondary-color",
"value": "#f59f0e"
},
{
"key": "--tertiary-color",
"value": "#FFF"
},
{
"key": "--separator-color",
"value": "#CCC"
},
{
"key": "--footer-color",
"value": "#EEE"
},
{
"key": "--nav-color",
"value": "#FBFBFB"
},
{
"key": "--bg-content-color",
"value": "#f4f4f4"
},
{
"key": "--buy-color",
"value": "#ff4d37e8"
},
{
"key": "--buy-dark-color",
"value": "rgba(150, 0, 42, 1)"
},
{
"key": "--free-color",
"value": "#f8ba03"
},
{
"key": "--free-dark-color",
"value": "#f69b04"
},
{
"key": "--installed-color",
"value": "#43a047"
},
{
"key": "--installed-dark-color",
"value": "#2e7d32"
},
{
"key": "--button-primary-color",
"value": "#2C55A2"
},
{
"key": "--button-secondary-color",
"value": "#FFF"
},
{
"key": "--button-tertiary-color",
"value": "#2C55A2"
},
{
"key": "--black-color",
"value": "#4c4c4c"
},
{
"key": "--alert-color",
"value": "#ff4d37e8"
},
{
"key": "--gray-color",
"value": "#e4e4e4"
},
{
"key": "--footer-logo-url",
"value": "url('/img/logo-myportal.png')"
}
],
"website": "myportal"
}
Mongo :
- insert a document in
app_instances
collection with some requirements :-
application_id
must be equal toportal
-
id
,portal_id
must have same value, they will represent thebrandId
-
{
"id":"<portal instance id>",
"name":"<portal display name>",
"provider_id":"<id of providing organization>",
"application_id":"portal",
"status":"RUNNING",
"modified":NumberLong(<current timestamp in ms>),
"redirect_uri_validation_disabled":false,
"portal_id":"<portal instance id>",
"needed_scopes":[{"scope_id":"openid"},{"scope_id":"profile"},{"scope_id":"email"},{"scope_id":"address"},{"scope_id":"phone"},{"scope_id":"datacore"}]
}
- insert a document in
credentials
collection:
{
"clientType" : "PROVIDER",
"id" : "<portal instance id>"
}
- create a client_secret and keep it on your portal instance configuration:
java -cp "/usr/lib/oasis/lib/*" oasis.tools.SetPassword -c /etc/oasis/oasis.conf --type PROVIDER --client-id <portal instance id>
- insert a document in the
services
collection:
{
"name":"<portal display name>",
"provider_id":"<id of providing organization>",
"visible":false,
"instance_id":"<id of the app_instances document>",
"id":"<generated uuid>",
"redirect_uris":["https://<portal domain name>/callback"],
"post_logout_redirect_uris":["https://<portal domain name>/my"],
"modified":NumberLong(<current timestamp in ms>),
"status":"NOT_AVAILABLE",
"icon":"https://www.ozwillo.com/static/img/logo-oz-short-64x64.png",
"portals":["<portal instance id>"]
}
- create a new brand_info object which contain colors of your portal for the login pages :
{
"brand_id":"<portal instance id>",
"main_color":"#2C55A2",
"main_color_dark":"#E62984",
"text_color":"#FFF",
"footer_text_color":"#FFF",
"button_text_color":"#FFF",
"main_background_color":"#2C55A2",
"footer_background_color":"#E62984",
"text_color_hover":"#555",
"background_color_hover":"#eee",
"claim_required_text_color":"#f01d11",
"claim_need_auth_text_color":"black",
"error_background_color":"#f4511e",
"error_text_color":"white",
"warning_background_color":"#f0ad4e",
"warning_text_color":"white",
"success_text_color":"#5cb85c",
"large_logo":"oasis-ui/images/logo/large_<portal instance id>.png",
"portal_base_uri":"https://<portal domain name>/",
"mail_from":"<email>"
}
Kernel source :
- add a logo image in the
oasis-webapp/src/main/resources/oasis-ui/images/logo
with this format : large_[application_id].png