sharepoint as authentication provider - web-services

Is it possible to use sharepoint as an authentication provider?
This is my setup:
Server A -> IIS web application loading custom dll's for different user providers
Server B -> Sharepoint 2007
Server C & D -> Multiple AD's
Sharepoint is configured to use multiple AD's as user provider
This is what I want to achieve:
A user enters his sharepoint credentials in the web application, this automaticly loads the dll (which I need to create)
This dll then forwards the credentials somehow to sharepoint and retreives some sort of user object.
The dll parses the sharepoint user object to it's own class and sends it back to the webapp.
Is this possible? If yes, what would be the best way to do this? I know sharepoint has webservices etc but I don't know if this could work.
All servers are in the same network, accessed locally so passing the credentials isn't a big problem.

UserGroup Web Service
Did you consider using the UserGroup Web Service, http://msdn.microsoft.com/en-us/library/websvcusergroup.aspx.
Available at http://sharepointserver/_vti_bin/UserGroup.asmx
It has the GetUserInfo method, http://msdn.microsoft.com/en-us/library/websvcusergroup.usergroup.getuserinfo.aspx
Authentication Web Service
There is also the Authentication Web Service, but it only return the login result, http://msdn.microsoft.com/en-us/library/websvcauthentication.aspx
Great for checking the validity of a user anyway.
Available at http://sharepointserver/_vti_bin/Authentication.asmx

Related

Publish and subscribe an application as an API in WSO2 AM-1.7.0

I have a Timesheet Entry application which needs to be exposed as an API which the users shall use for entering their effort time for assigned tasks.I have the following queries:
I have the login authentication created as a restful client which I have published and currently subscribing with JSON message as response.How to open up this service in the UI, so that the user gets the usual page for the authentication.
How to access this API from different user systems?Does the user has to login to the WSO2 Store everytime he wants to use this API?
The WSO2 docs mention to create users and roles, but since there will be around 10K users for this, how to do this to make the user feel that its the same application as before?
Users are not required to log into the store. Only the application developer has access to the store.Application developer gets the consumer key/secret pair from store and embeds it in the web Application.
Application users/subscribers do not need to be aware of the API store. When they use/login to the application, access tokens can be generated using the embedded consumer key/secret pair based on a specific grant type ( Eg: Password) and access the service exposed via the API.
It is not required to create users and roles manually. If there exists a user store , you can integrate it with WSO2 API Manager. [1] explains how to integrate a user store.
You can refer to the sample [2] to get an idea of how this is done in WSO2 API Manager.
This sample demonstrates a scenario where various services of a deployed web application are accessed via APIs created in API Manager.
[1] https://docs.wso2.com/display/AM170/Configuring+User+Stores
[2] https://docs.wso2.com/display/AM170/Invoking+APIs+using+a+Web+App+Deployed+in+WSO2+AS

Office 365 (SharePoint Online) C# Authentication from custom application using tokens

I have a custom c# windows forms application. How can I authenticate to Office 365 SharePoint Online in order to issue HttpWebRequest to customer web-sites using ACS tokens.
User will provide username and password and based on that I want to generate an ACS token that will allow the application to make requests on customer web-site. Also I want to be able to regenerate the token if it's expired, without reprompting username and password if possible.
if this will be a provider hosted app, then no problem is easy to do it but how can I achieve this from a custom application which is not a SharePoint app?
You will have to rewrite the code which supports [SharePointContextFilter] attribute which does the work in provider hosted app. Or port your web forms application to a provider hosted app template and deploy.

SharePoint 2010 Web Part expose web service?

Is it possible for a SharePoint 2010 Web Part to expose a web service (WCF?)?
I want a Web Part to send emails if a certain condition is met. The web part should be hit every 15 mins via a call initiated from a custom in-house scheduler.
Cheers
A web part is just a visual component. It can expose a web service. However, custom web services can be created and deployed to SharePoint where you can access data from a site (a list maybe) and add custom logic to send the email.
Here's a good guide on how to deploy web services to SharePoint.

Accessing SharePoint authentication information from .NET ActiveX control

We have a .NET ActiveX control which is embedded inside a custom SharePoint page.
The user has to authenticate (Windows Authentication not Forms Authentication) to access this page.
Our ActiveX control is making web service calls back to the SharePoint server. Because the SharePoint server does not allow anonymous access, we need to provide credentials as part of the web services call. If the user is checking the 'Remember Password' checkbox when prompted for credentials, then we can access those credentials via the CredentialCache.DefaultNetworkCredentials. However, if they do not check that checkbox, we need another mechanism to get a hold of valid credentials (which must exist since we are embedded in a page that can only be accessed via authentication).
How can we access the credential information (probably stored in a cookie) we need to authenticate against SharePoint so we can access the web services?
There is a method in the SPUtility class called EnsureAuthentication, you can also hit the /_layouts/Authenticate.aspx page to log the user automatically in sharepoint.
You can also encapsulate your call with Impersonation.
You can send a message to your ashx like you do it from Silverlight using XMLHTP.

Using a Web Service to access data outside MOSS using AD for authentication

So here is the scenario:
I have a MOSS 2007 box and I want my clients to be able to access a SharePoint site via the internet. I am told that I will be using an IPA and AD for authentication. However I have a DB outside of SharePoint that holds various business data and I want to use Web Services to access the data, manipulate it, and send it back to SharePoint via web parts.
The issue is that, from what I understand, I am going to have to authenticate the AD user every time a request to the Web Service happens. Obviously I dont want to do this every time because they have already authenticated to get onto the site, however I do want each call to have some form of security so its not open calls to my db. I do plan on having other applications access this service outside of SharePoint, so I dont want to have to reinstall the service for each application or even again.
Has anyone had to perform this task or something similar or do you have any suggestions on how to do this?
Thank you in advance and happy coding!
Why not just deploy the webservice to Sharepoint using a Sharepoint solution and a Feature.
That way it will be running under the sharepoint app pool and all authentication is done by sp.
Edit:
Seeing that SharePoint should not be in "control" (as stated in the comment), you should create the webservice, and run the application it's under in as using Windows Authentication. IMHO you should create a WCF Service. The, using the information found in this article you make the Service authenticate users against the AD usergroups they are in. see the "Security: Authentication" section of the article.
Then in Visual Studio you create a webpart and add a service reference to the project, pointing to your newly created Service. Have the webpart perform the needed logic (i.e. display data etc.)
Deploy the webpart to SharePoint using a SharePoint solution (.wsp files, created with WSPBuilder). Google for SharePoint + wspbuilder + tutorials. The solution should contain 1 feature to deploy the webpart. WSPBuilder integrates with VS and allows for the creation of WSPBuilde project. add a webpart feature item to the project (it will create the xml (deployment related) and code file for the webpart.