This commit is contained in:
parent
46f5c107b8
commit
fa34ed249b
233 changed files with 4000 additions and 1396 deletions
|
|
@ -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});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue