@@ -58,7 +58,7 @@ public override AuthenticationResult Authenticate([NotNull] string authenticatio
58
58
59
59
if ( ! authenticateContext . Accepted )
60
60
{
61
- throw new InvalidOperationException ( "The following authentication scheme was not accepted: " + authenticationScheme ) ;
61
+ throw new InvalidOperationException ( $ "The following authentication scheme was not accepted: { authenticationScheme } " ) ;
62
62
}
63
63
64
64
return new AuthenticationResult ( authenticateContext . Principal ,
@@ -79,7 +79,7 @@ public override async Task<AuthenticationResult> AuthenticateAsync([NotNull] str
79
79
// Verify all types ack'd
80
80
if ( ! authenticateContext . Accepted )
81
81
{
82
- throw new InvalidOperationException ( "The following authentication scheme was not accepted: " + authenticationScheme ) ;
82
+ throw new InvalidOperationException ( $ "The following authentication scheme was not accepted: { authenticationScheme } " ) ;
83
83
}
84
84
85
85
return new AuthenticationResult ( authenticateContext . Principal ,
@@ -101,7 +101,7 @@ public override void Challenge(AuthenticationProperties properties, string authe
101
101
// The default Challenge with no scheme is always accepted
102
102
if ( ! challengeContext . Accepted && ! string . IsNullOrEmpty ( authenticationScheme ) )
103
103
{
104
- throw new InvalidOperationException ( "The following authentication type was not accepted: " + authenticationScheme ) ;
104
+ throw new InvalidOperationException ( $ "The following authentication scheme was not accepted: { authenticationScheme } " ) ;
105
105
}
106
106
}
107
107
@@ -118,7 +118,7 @@ public override void SignIn([NotNull] string authenticationScheme, [NotNull] Cla
118
118
// Verify all types ack'd
119
119
if ( ! signInContext . Accepted )
120
120
{
121
- throw new InvalidOperationException ( "The following authentication scheme was not accepted: " + authenticationScheme ) ;
121
+ throw new InvalidOperationException ( $ "The following authentication scheme was not accepted: { authenticationScheme } " ) ;
122
122
}
123
123
}
124
124
@@ -135,7 +135,7 @@ public override void SignOut(string authenticationScheme, AuthenticationProperti
135
135
// Verify all types ack'd
136
136
if ( ! string . IsNullOrWhiteSpace ( authenticationScheme ) && ! signOutContext . Accepted )
137
137
{
138
- throw new InvalidOperationException ( "The following authentication scheme was not accepted: " + authenticationScheme ) ;
138
+ throw new InvalidOperationException ( $ "The following authentication scheme was not accepted: { authenticationScheme } " ) ;
139
139
}
140
140
}
141
141
0 commit comments