Get the user's name and email from OpenID Logged In Username - asp.net

I am using OpenID with Google to login into my web page. I want to retrieve the email and user's first and last names to know who is logging in to my web page.

see here for an example about Integrating OpenID in an ASP.NET MVC Application using DotNetOpenAuth

Related

LDAP authentication in asp.net MVC 5 application

I have an ASP.NET MVC 5 applicationand I want to add LDAP authentication.
I already have a form page which is a startup page which tell the user to enter his name and password. The form page is redirected after submit to a home page without testing anything.
I don't know now how to verify if the user exists or not using ldap authentication.
Is this MS ActiveDirectory LDAP? If so you will want to take a look at ASP.Net Identity: http://www.asp.net/identity/overview/getting-started/introduction-to-aspnet-identity

Disable username and password login in ASP.NET MVC 4 without disabling OAuth?

I have login via OAuth already set up in ASP.NET MVC 4, using the built-in Individual User Accounts authentication method. Is there a way that I can disable login with a username and password, so that people can only login via one of the OAuth providers?
You can just remove the code in the View that shows the local login form.

Authentication with oAuth and ASP.NET MVC + WebApi

We are planning to start developing our new site with ASP.Net, MVC and AngularJS. I will also have a WebApi that i would like to use oAuth authentication with, because it is easy to to pass in token, plus may want to allow users to login with Google, Facebook etc in the future.
Questions
If i want to use oAuth on my WebApi (which is a separate application), what authentication method should i be using for my asp.net MVC website? oAuth? Forms? Both? And how do you implement this? On my API i wrote a simple oAuth provider that asks for a username and password and returns a token string.
Should my WebApi have a single sign on login page to interact with the website? Or should the login page be on the website? Should the login page use client side calls or server side calls?
What is actually within the oAuth token and how does it link to my website? Do I have to do something on the server once they login via Facebook/Google? Can I use this token on my server to determine which user is logged in?
Our website has many databases, all the same, but depending which user is logging in, depends on which database they can view data from. Is this easy to cope with using standard method/objects in ASP.Net MVC? Or is this going to force me in writing my own code?
Any advice would be appreciated as well!
If are you planning to use MVC 5 You could use Asp.Net Identity.
Take a look here: http://www.asp.net/mvc/overview/security/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on
I hope this could help you.
Diego
Your best bet :
This topic shows how to secure a web API using OAuth2 to authenticate
against a membership database for both local and social login
http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api

SSO between Sharepoint & Asp.Net MVC3

I have a Sharepoint Site(am not the SP expert) where user logs in this is form based authentication model where Username password is stored in a db...now when user clicks on a link i want him to redirect to a MVC3 application. While doing so i want user tobe autmatically signed in to MVC application. What is the best way to implement that.
Thanks
One way is to pass authentication token in the http header from SharePoint to other web application. Then, MVC application should validate the token before accessing the web site.

How do I connect to Facebook from an ASP.NET webservice?

I want to create a webservice that allows user to connect to Facebook. In my webservice, there is a method named "connect" which requires 2 parameters: the username and password (of the Facebook account).
I have to use this username and password to connect to Facebook from the webservice. After that, I want to allow the user to post on their walls...Is is it possible to connect to Facebook using a webservice?
I tried a lot, and I can login to Facebook account, but I can't get the sessionkey and userid.
How can I integrate Facebook in an ASP.NET webservice?
Please help me to resolve this issue.
Facebook Connect Authentication for ASP.NET is a component that allows ASP.NET web developers to identify and validate users accessing their website or web services using Facebook Connect.
It is written in C#, targeted at .NET 2.0.
http://fbconnectauth.codeplex.com/
You can also use this Tutorial to authenticate the users in ASP.NET application
http://devtacular.com/articles/bkonrad/how-to-retrieve-user-data-from-facebook-connect-in-aspnet/

Resources