User bio
404 bio not found
Member since Dec 16, 2015

You should be able to create a new class in whatever database you're doing this in, no parent class needed.
Within that class define a ValidateUser class method as above. It should check their credentials and confirm a user exists. If you're using the Caché users table you can use the example above, otherwise you'll need to open the relevant person class and pull the relevant fields from there. Then set the claims that you want to send back to the client based on which scopes you're using. You can set claims with:

Do properties.SetClaimValue("name",tUser.Name)

You can check scopes with something like:


Then in the portal under System Admin -> Security -> OAuth2 -> Server. Go to the Customization tab and change the Validate User Class to your new class name. That will make the OAuth processing look there for a ValidateUser method and call it.



This looks great Dan. For anyone interested, I put together an example of using OAuth2 in AngularJS in the Widgets Direct demo app here:

It shows sending the requests and getting the access code back, but I haven't included validating that on the server side. If there is interest I can look at adding that.

Certifications & Credly badges:
Orion has no Certifications & Credly badges yet.
Global Masters badges:
Orion has no followers yet.
Orion has not followed anybody yet.