Skip to main content

Samo-login

Header

Level: Beginner

Keywords: login page module, user login, authentication

The result: login page module

Samo-login module is typically used in the default page for an unauthorized user to log in the application part. It is a page that contains the login form and performs login.

How to implement samo-login?

samo-login on page - configuration example
{
"title" : "Login",
"replaceTitle": true,
"hideMenu" : true,
"security": {
"loggedIn": false
},
"module": {
"type": "component:dynamic-app/modules/samo-login",
"rememberMeAuthentication": true,
"backdropImage" : "images/login-backdrop-new.jpg",
}
}

If an unauthorized user loads some application part (e.g. cockpit, assets), he/she will be redirected to the default login page, and after a successful login, to the dashboard page. This behavior needs to be configured in each application part root file.

Cockpit application part - default login - configuration example
{
"title" : "Cockpit",
"logo" : "<$import:../common/logo.txt>",
"languages" : "<$import:../common/languages.json>",
"defaultPage" : "dashboard",
"defaultGuestPage" : "login"
}

In case of some additional content need on the login page, there is a possibility to configure additionalContent property. It can be used for some additional information which user needs to know before the login.

samo-login with additional content - configuration example
{
"title" : "Login",
"replaceTitle": true,
"hideMenu" : true,
"security": {
"loggedIn": false
},
"module": {
"type": "component:dynamic-app/modules/samo-login",
"rememberMeAuthentication": true,
"backdropImage" : "images/login-backdrop-new.jpg",
"additionalContent": "Markdown text with image possibility: {char:<}img src={resourceUrl:images/samo.png} {char:>}"
}
}