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