summaryrefslogtreecommitdiffstats
path: root/src/server/Api/Internal/Account/CreateGithubSessionRoute.cs
blob: 21cfead80e44c04610d49c134c0a15cde022913d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using AspNet.Security.OAuth.GitHub;

namespace IOL.BookmarkThing.Server.Api.Internal.Account;

public class CreateGithubSessionRoute : RouteBaseInternalSync.WithoutRequest.WithActionResult
{
	[AllowAnonymous]
	[ApiVersionNeutral]
	[ApiExplorerSettings(IgnoreApi = true)]
	[HttpGet("~/v{version:apiVersion}/account/create-github-session")]
	public override ActionResult Handle() {
		return Challenge(new AuthenticationProperties {
								 RedirectUri = "/oauth-cb",
						 },
						 GitHubAuthenticationDefaults.AuthenticationScheme);
	}
}