28 lines
744 B
C#
28 lines
744 B
C#
using System;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Threading;
|
|
using System.Web;
|
|
using DotNetOpenAuth.Messaging;
|
|
using DotNetOpenAuth.OAuth2;
|
|
using Taloyhtio.GeneralSSO.Server.CodeFiles.Infrastructure.OAuth;
|
|
using AuthorizationServer = DotNetOpenAuth.OAuth2.AuthorizationServer;
|
|
|
|
namespace Taloyhtio.GeneralSSO.Server
|
|
{
|
|
public class AccessToken : IHttpHandler
|
|
{
|
|
private readonly AuthorizationServer server = new AuthorizationServer(new AuthorizationServerHost());
|
|
|
|
public bool IsReusable
|
|
{
|
|
get { return true; }
|
|
}
|
|
|
|
public void ProcessRequest(HttpContext context)
|
|
{
|
|
this.server.HandleTokenRequest(null).Respond(HttpContext.Current);
|
|
}
|
|
}
|
|
}
|