File size: 994 Bytes
7b715bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
@using System.Security.Claims;

@model IReadOnlyList<string>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Google.Apis.Auth.AspNetCore3 sample - OAuth Tokens</title>
</head>
<body>
    <h2>Google.Apis.Auth.AspNetCore3 sample - OAuth Tokens</h2>
    <p>You are logged in as @User.FindFirst(ClaimTypes.GivenName)?.Value.</p>
    @if (@Model.Count > 0)
    {
        <p>Here is information about the OAuth tokens being used for authentication and authorization purposes. </p>
        <ul>
            @foreach (var token in @Model)
            {
                <li>@token</li>
            }
        </ul>
    }
    else
    {
        <p>There's no OAuth token related information that we could find. This probably means that an error has occurred during authentication.</p>
    }
    <p><a asp-controller="home" asp-action="index">Index</a></p>
</body>
</html>