This commit is contained in:
Paul Schneider 2016-06-07 14:32:43 +02:00
commit fa34ed249b
233 changed files with 4000 additions and 1396 deletions

View file

@ -1,35 +0,0 @@
using System;
using Microsoft.AspNet.DataProtection;
namespace Yavsc.Auth
{
public class MonoDataProtectionProvider : IDataProtectionProvider
{
private readonly string appName;
public MonoDataProtectionProvider()
: this(Guid.NewGuid().ToString())
{ }
public MonoDataProtectionProvider(string appName)
{
if (appName == null) { throw new ArgumentNullException("appName"); }
this.appName = appName;
}
public IDataProtector Create(params string[] purposes)
{
if (purposes == null) { throw new ArgumentNullException("purposes"); }
return new MonoDataProtector(appName, purposes);
}
public IDataProtector CreateProtector(string purpose)
{
return Create(new string[] {purpose});
}
}
}