using sharepoint user credentials in a flex application? - apache-flex

I am deploying a flex application in sharepoint as a web part.
I am planning to use sharepoint user credentials for my flex application.
My flex application consists of various different user roles like author,reviewer etc .
An author should be able to see all the list of sharepoint users available and can make any number of them as reviewer or author . For this I require following functionality through sharepoint for my flex application:-
1) Getting list of all users of sharepoint
2) Getting the username of the current logged in user of sharepoint through the flex application, which is deployed as a web part in sharepoint.
How to do this ?

Did this by creating a custom asp.net web service and deploying it on sharepoint.Through this web service , I retrieved current user and the list of users using share point object model.Flex inquires this web service for current user and list of available users

Related

How does Identity work in project template with Individual user account for ASP.NET Core MVC 3.1?

Upon clicking on register link, it displays page but under Areas/Identity there are no pages. We can scaffold identity for empty template, but how is it working for web application template for individual user account?
Register page
Area/Identity
We can scaffold identity for empty template, but how is it working for web application template for individual user account?
It seems that you created an ASP.NET Core Web Application project with Individual User Accounts, which would help integrate and configure ASP.NET Core Identity as a Razor Class Library in the generated project.
If you'd like to customize the UI of identity, you can also apply the scaffolder to selectively add the source code contained in the Identity Razor Class Library (RCL) and modify the code and change the behavior.
For more information, please check this doc about "Scaffold Identity into an MVC project without existing authorization".
You will need to setup an Identity store where user information can be saved. You could setup an in-memory store but at some point you will want to persist account information
so you'll want to setup a database in SQL Server, MySQL, or some other system to save the data.
As to the pages. They are being pulled from the Identity libraries. They provide a default setup that, as you mentioned, can be changed. The register piece, and sign-in/out will still need the data store to persist any information. Once you setup the datastore in the startup.cs class it will be injected into the applicable classes.

OAuth User Registration - ASP.Net 4.5

I'm currently in the beginning stages of developing a website using ASP.Net 4.5 and C#. I'm wanting to map out the process flow of user registration and authentication. There's a starter project that uses the WebSecurity framework - with Simple Membership - that includes OAuth integration, allowing users to use Facebook and other logins to access the site.
What special considerations must one consider when using external logins on their website?
--Specialty login and registration pages for each provider used
--Authentication checks -- making sure application access hasn't been revoked during the course of any logged in session
--Re-Authentication screens
--Merging accounts
I'm seeing a bunch of different posts on how to set up ASP.Net and the WebSecurity framework to accept different logins, but not so many on the considerations needed before implementing such functionality
EDIT: This is an MVC site. Updated post to correct this

How to get SharePoint Site authentication information to use it in an ASP.NET website which is integrated inside that SharePoint Site?

I have integrated my ASP.NET website into a SharePoint Site by using an IFrame in the SharePoint Page via a Content Editor Web Part. The ASP.NET web application doesn't have any authentication & authorization implemented in it.But the SharePoint site is having some authentication implemented. Now my requirement is how to get and use that SharePoint authentication information in my ASP.NET web application programmatically to do some code manipulations based on the authenticated user level.Any help would be appreciated.Thanks in Advance
The 'Right' way of doing it would be to redevelop your site as a collection of Application pages. This allows you to limit permissions to Site Collection Administrators, or just about any level of SharePoint Authentication.
http://msdn.microsoft.com/en-us/library/Ee231581(v=vs.100).aspx
This allows you to use the SharePoint object model directly in your 'web' application.
It's a bit complicated to shift from a traditional web application to getting all the pieces running under the Sharepoint _layouts folder, but its worth the time spent and pretty easy to update.
It should be noted that your existing IIS website would be removed and the pages re-homed to that layout folder, via a SharePoint Feature containing your application pages.

Can I use SharePoint to authenticate users on a separately hosted website?

The behaviour I would like is for a user to be able to visit a custom built website and if they are already authenticated against sharepoint for the custom website to know who they are and give them various rights. If they are not recognised by sharepoint then I would like them to login to sharepoint and be directed back to the custom website.
Sharepoint picks its users and groups up from Active Directory. I don't know much about the internals of the server, but the custom one will be in a separate domain (I think) though I have full control over the custom and moderate control over the SP infrastructure.
A hint at how to progress would be great!
As you rightly said SharePoint can be condigured to use Active Directory for Authentication and User Management. So AD and Sharepoint are 2 different things and you are just linking them. You can develop your custom asp.net application to use AD for Authentication.
Using SharePoint groups in your custom application is difficult (You will have to develop your own service which will check the loggedin user and see if he is present in the SharePoint group)
Another option is to use a Custom ASP.net membership provider and use this in your sharepoint application. This way you can use the same asp.net membership provider for your asp.net application.
Check out Configuring Single Sign on for SharePoint. Could give you some ideas.

Shared Authentication, Membership & Roles across DNN and ASP.net applications

Here's my situation. I have a DotNetNuke application. I want to link to an existing ASP.net website from within the DNN website, and have decided to use DNN's IFrame for that.
The existing ASP.net application uses Forms Authentication for security - only authorized users can access the pages. This asp.net application also requires user roles for authorization to different pages.
I don't want users to have to sign on twice, and I'd like the asp.net page to use the user membership and role data from the DNN application - it shouldn't require it's own membership database.
Is this possible? According to the MSDN website:
"ASP.NET supports forms authentication in a distributed environment, either across applications on a single server or in a Web farm. When forms authentication is enabled across multiple ASP.NET applications, users are not required to re-authenticate when switching between the applications."
Does this apply to DotNetNuke applications linking to asp.net applications? Both are on the same domain, too.
(I tried modifying the config.web of the asp.net page to work with the DNN config.web, matching machine keys and forms settings - but it didn't work. I could be doing something wrong, but before I pursue, I want to know if it's even possible.)
Thanks for any help!
I don't know if what you're talking about is possible within DNN. We're on DNN 4.0 and they do some weird things with the ASP.NET membership tables which may cause trouble.
What I can tell you is an alternative way (assuming you have control over the ASP.NET application). There is a project called MADAM (Mixed Authentication Disposition ASP.NET Modules - I know a bit of a mouthful) that can be used to provide a method other than forms authentication for application logon.
What you could do is set MADAM up on your ASP.NET application and from DNN pass user credentials to the ASP.NET application. The end result appears to the user as single sign on.
If you need me to elaborate on anything, let me know in the comments.
Actually i am displaying some aspx pages in a iframe module present on a dnn page. Now since inside the iFrame i am displaying aspx pages hosted elsewhere but on same server. I am just want to authenticate the dnn logged-in user before loading the page inside iFrame.
Do dnn provide any API which i can call from apsx pages hosted elsewhere in order to restrict access to ony unauthorized user.

Resources