Find SSO Server / Service solution like CAS but PHP/ASP.NET - single-sign-on

I want to find a solution like CAS (www.jasig.org/cas) but source code is PHP or ASP.NET.
I have some websites, ex
www.abc.com
forum.abc.com
support.abc.com
*.abc.com
and
www.xyz.com
*.xyz.com
I want all user data (username, fullname, email, password_hash,...) are strored on 1 server (ex: id.abc.com / id.xyz.com). User just neeed login 1 place for access websites
I can not build a system like jasig CAS just want to find a solution like CAS made by PHP/ASP.NET.
Give me some idea.
Thanks !

For some reasons, we will build own SSO Service !
Thanks !

Related

"Facebook at work" What is the Authentication API ? How to use it?

I'm working with a company which use Facebook at work "companyName.facebook.com". (fb#w, facebookatwork)
I need to create a third party application which can authenticate each User with their (fb#W) "Facebook at work" standalone account :
On https://developers.facebook.com/docs/facebook-at-work/authentication/facebook
The authentication doesn't work with the current FB API
I didn't find any information (or examples) concerning the authentication with the fb#w API.
I also tried to inspect what does the fb#w web (https://fb.facebook.com/) authentication and found a post request :
'https://companyName.facebook.com/login.php?login_attempt=1&lwv=101'
with three params :
email : email#companyMail.com,
pass : password,
lsd : AVtApDPM //I don't know what that is and how to generate it...
But unfortunately I got a 302 error, and I can't use this as a proper API....
Do you have any information concerning the fb#w authentication ?
Thank you very much.

SSO for DNN websites

My requirement is this:
I have a DNN website www.websiteA.com.
I want to build www.websiteB.com and www.websiteC.com on the same DNN installation. www.websiteB.com and www.websiteC.com should allow users of www.websiteA.com to login with the same username and password.
When a user logs in to www.websiteA.com, and then navigates to www.websiteB.com or www.websiteC.com, they shouldn’t have to login again as they are already logged in to the main website.
I found modules that will let me share users between these websites, such that they can login to any of the three websites using the same credentials.
However, I cannot find a way to login a user to all websites simultaneously, so that the user does not have to login again.
I would prefer to do this without modifying the DNN source too much. Since all three websites are on the same DNN installation, I was hoping there would be a way to share authentication cookies, but I haven't found any yet.
Can anyone provide me more direction in this matter? Thanks!
I did this exact thing for two clients using the Site Groups feature but it required the caveat as in the above comments. You must use a child aliases for your other portals so that they are all on the same domain. That is key so that the user's session cookie can be used across portals.
So this is how I setup the portal aliases:
websiteA = portal 0, alias websiteA.com (Primary)
websiteB = portal 1, alias websiteA.com/b (Primary) and alias websiteB.com redirect alias
websiteC = portal 2, alias websiteA.com/c (Primary) and alias websiteC.com redirect alias
The Site Groups user interface to manage the groups is an Evoq feature, but the backend is a core platform structure.
Here is how you would configure it without the UI in DNN Community:
Create a record in PortalGroups table:
MasterPortalID = 0, PortalGroupName = 'WebsiteA Group', AuthenticationDomain = 'websiteA.com'
Now update the PortalGroupID field in the Portals table:
WHERE PortalID = 0, SET PortalGroupID = -1
WHERE PortalID = 1, SET PortalGroupID = 1 (assuming the new PortalGroupID you added was 1)
WHERE PortalID = 2, SET PortalGroupID = 1
Another thing you could do is write your own custom DNN Authentication Provider (http://www.dnnsoftware.com/community-blog/cid/134678/dotnetnuke-tips-and-tricks-12-creating-your-own-authentication-provider).
Then, just have the authentication provider check an authentication cookie on the user's system. If the cookie is valid (and not expired), you can automatically log them in. Otherwise, redirect them to the main login screen. I did this, but the other site was a Java based dashboard.

Use MATLAB's webread to login to website and extract text

I'm wondering how to extract text from a password protected website using Matlab's "webread" function. I have the following code (part of which i got from here):
values=inputdlg({'Url','Username:','Password'});
options=weboptions('Username',values{2},'Password',values{3},'Timeout',Inf);
html=webread(values{1},options);
txt = regexprep(html,'<script.*?/script>','');
txt = regexprep(txt,'<style.*?/style>','');
txt = regexprep(txt,'<.*?>','');
But it gets stuck at the login window for every webpage I've tried. Help? Ideas? Thanks.
The weboptions username and password parameters are for basic HTTP authentication, which is different than logging into Stack Exchange, Gmail, etc though the username and password boxes on a web page.
Some sites provide other mechanisms that might allow you to log in (like OAuth), and the File Exchange has a smattering of clients.
Here is an OAuth interface for login into the flicker using Matlab, maybe it help you. but you have to be sure that your website support this authentification method (as "Matt Krause" mentioned in his answer).
Link to Tutorial

Redirect a.com/suffix to b.com

Context: I'm developing a website for a conference happening early next year. I'm using tito.io to process registrations and Github Pages to host the website.
At the moment, users register by visiting https://tito.io/maine-civic-hack-day/maine-civic-hack-day-2013. I'd like to clean that up, and point them to http://mainecivichackday.com/register instead.
I've read about 301, 302, and masked redirects, but as far as I've seen so far, those are applicable to subdomains. For instance, I can make this work with register.mainecivichackday.com, but not with mainecivichackday.com/register.
What are my options?
TLDR: how do I point a.com/b to c.com?
You can set up a redirect on the a.com/b page to b.com/a but the user will see that they were redirected to.
If you want it to show as a clean url to the user, the webserver at tito.io will have to be configured to answer to your desired url such as http://register.mainecivichackday.com

Set SSL after Login/Authentication in Kentico

I have requirement that once user has logged in and is authenticated URL should be changed to SSL and when he logs out url is back to HTTP.
I am aware about Properties in webpart where we can set YES/NO/INHERITS/NEVER.
I am able to set HTTPS permanently but not dynamically.
Any suggestion/help is appreciated.
I'm not aware of any functionality within Kentico to do this, but you should be able to create a webpart and place it on the masterpage. This web part would just check the current user, and if there is a user that is logged in redirect to https version and vice versa.
You could also add some logic to make sure it doesn't do this in the the edit tab in cmsdesk.
You can check the user with
CMSContext.CurrentUser
Some help with redirecting to the secure page can be found at
asp.net c# redirecting from http to https
As rocky said there is not functionality out of the box that will do this for you.
You need to create a web part like it was suggested by Lukek that checks that the user is logged in and redirects them to the https address.
The code below will redirect.
if (!Request.IsLocal && !Request.IsSecureConnection)
{
string redirectUrl = Request.Url.ToString().Replace("http:", "https:");
Response.Redirect(redirectUrl);
}
As suggested bu lukek you need to check the CMSContext.CurrentUser however I would also use the HttpContext.User property.
That will enforce the request to be https.