forked from aspnet-contrib/AspNet.Security.OAuth.Providers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImgurTests.cs
27 lines (23 loc) · 1.19 KB
/
ImgurTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
* for more information concerning the license and the contributors participating to this project.
*/
namespace AspNet.Security.OAuth.Imgur;
public class ImgurTests(ITestOutputHelper outputHelper) : OAuthTests<ImgurAuthenticationOptions>(outputHelper)
{
public override string DefaultScheme => ImgurAuthenticationDefaults.AuthenticationScheme;
protected internal override void RegisterAuthentication(AuthenticationBuilder builder)
{
builder.AddImgur(options => ConfigureDefaults(builder, options));
}
[Theory]
[InlineData(ClaimTypes.NameIdentifier, "my-id")]
[InlineData(ClaimTypes.Name, "John Smith")]
[InlineData("urn:imgur:bio", "Software developer")]
[InlineData("urn:imgur:created", "2019-03-17T13:57:00+00:00")]
[InlineData("urn:imgur:proexpiration", "2019-03-17T14:00:00+00:00")]
[InlineData("urn:imgur:reputation", "0")]
public async Task Can_Sign_In_Using_Imgur(string claimType, string claimValue)
=> await AuthenticateUserAndAssertClaimValue(claimType, claimValue);
}