Using [NotNull]
This commit is contained in:
parent
7fcbefc86f
commit
797e1287e3
|
|
@ -5,8 +5,8 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IdentityModel.Tokens;
|
using System.IdentityModel.Tokens;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using Microsoft.IdentityModel.Protocols;
|
|
||||||
using Microsoft.Framework.Internal;
|
using Microsoft.Framework.Internal;
|
||||||
|
using Microsoft.IdentityModel.Protocols;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Authentication.OAuthBearer
|
namespace Microsoft.AspNet.Authentication.OAuthBearer
|
||||||
{
|
{
|
||||||
|
|
@ -140,14 +140,9 @@ namespace Microsoft.AspNet.Authentication.OAuthBearer
|
||||||
{
|
{
|
||||||
return _tokenValidationParameters;
|
return _tokenValidationParameters;
|
||||||
}
|
}
|
||||||
|
[param: NotNull]
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("TokenValidationParameters");
|
|
||||||
}
|
|
||||||
|
|
||||||
_tokenValidationParameters = value;
|
_tokenValidationParameters = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -528,9 +528,9 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
||||||
/// The value of the cookie is: "N".</remarks>
|
/// The value of the cookie is: "N".</remarks>
|
||||||
private void WriteNonceCookie(string nonce)
|
private void WriteNonceCookie(string nonce)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(nonce))
|
if (string.IsNullOrEmpty(nonce))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("nonce");
|
throw new ArgumentNullException(nameof(nonce));
|
||||||
}
|
}
|
||||||
|
|
||||||
Response.Cookies.Append(
|
Response.Cookies.Append(
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.IdentityModel.Tokens;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Http.Authentication;
|
using Microsoft.AspNet.Http.Authentication;
|
||||||
using Microsoft.IdentityModel.Protocols;
|
|
||||||
using Microsoft.Framework.Internal;
|
using Microsoft.Framework.Internal;
|
||||||
|
using Microsoft.IdentityModel.Protocols;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
||||||
{
|
{
|
||||||
|
|
@ -252,13 +252,9 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
||||||
{
|
{
|
||||||
return _stateDataFormat;
|
return _stateDataFormat;
|
||||||
}
|
}
|
||||||
|
[param: NotNull]
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("value");
|
|
||||||
}
|
|
||||||
|
|
||||||
_stateDataFormat = value;
|
_stateDataFormat = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -272,13 +268,9 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
||||||
{
|
{
|
||||||
return _stringDataFormat;
|
return _stringDataFormat;
|
||||||
}
|
}
|
||||||
|
[param: NotNull]
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("value");
|
|
||||||
}
|
|
||||||
|
|
||||||
_stringDataFormat = value;
|
_stringDataFormat = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -315,14 +307,9 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
||||||
{
|
{
|
||||||
return _tokenValidationParameters;
|
return _tokenValidationParameters;
|
||||||
}
|
}
|
||||||
|
[param: NotNull]
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("value");
|
|
||||||
}
|
|
||||||
|
|
||||||
_tokenValidationParameters = value;
|
_tokenValidationParameters = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Authentication
|
||||||
|
|
||||||
if (_validSubjectKeyIdentifiers.Count == 0)
|
if (_validSubjectKeyIdentifiers.Count == 0)
|
||||||
{
|
{
|
||||||
throw new ArgumentOutOfRangeException(nameof(_validSubjectKeyIdentifiers));
|
throw new ArgumentOutOfRangeException(nameof(validSubjectKeyIdentifiers));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue