hi i am trying to create a login function without using the user entity and using my own entity and putting encrpytion for authenticiy. how can i achieve possible achieve this? thanks!! been finding many forums but there is no answer to this, thank you for helping me
Hello
this oml use customlogin
i hope it helps!
thank you opr replying!! but it doesntw ork :((
which type problem you are facing
in my login screen i want to use my own entity to login that i made instead of the user outsystem entity. how can i achieve this ?
You can check osm carefully I am also using own entity do not using outsystems entity and login.i am using custom login ans entity
doesnt work on my side sir
this sir
ok you can check update oml i hope it helps!
you really are life saver sir! thank you soomucha, and last one question may i know if i want my password is date type? i have this problem wherein i have this problem in my generatesaltedmd5hash password is there a way i can put it in date type? thanks sir
Hi @budang haba ,
In OutSystems, the built-in user authentication and session management are tightly coupled with the Users module and its associated entities. While it's not recommended to completely bypass this system, you can create a custom authentication solution that works alongside the built-in one. Here's a more detailed approach:
Here's a step-by-step process:
Example pseudo-code:
// Your custom authentication logic
If AuthenticateEmployee(username, password) Then
// Get or create a corresponding User
userId = GetUserId(employeeId)
// Create OutSystems session
System.Login(userId)
// Additional custom logic as needed
End If
This approach allows you to use your custom entity and encryption methods while still leveraging OutSystems' session management capabilities. Remember to handle user roles, permissions, and other session-related information that might typically be managed by the Users module.
Keep in mind that while this method works, it bypasses some of OutSystems' built-in security features. Ensure you implement proper security measures in your custom authentication logic.
For encryption, you can use OutSystems' built-in cryptographic functions or integrate with external encryption libraries if needed.
If you need more specific guidance on implementing encryption or any part of this process, feel free to ask!
THANKS FOR This explanation and tips sir but im not that good at following in terms of reading im more of a visual and hoping you have an oml example for this but thanks sir!!!
// CustomUser Entity
// Attributes: Id (Identifier), Email (Text), Password (Text)
// RegisterUser Action
Input: Email (Text), Password (Text)
Output: OutputMessage (Text)
HashedPassword = CryptoAPI.HashPassword(Password)
UserRecord.Email = Email
UserRecord.Password = HashedPassword
CreateCustomUser(UserRecord)
OutputMessage = "User registered successfully"
// LoginUser Action
UserRecord = GetCustomUserByEmail(Email)
If (UserRecord != Null) {
IsPasswordValid = CryptoAPI.VerifyHashedPassword(UserRecord.Password, Password)
If (IsPasswordValid) {
OutputMessage = "Login successful"
} else {
OutputMessage = "Invalid credentials"
}
Outp
utMessage = "User not found"
what you mean by this sir