blob: 532c4059b71b9b289a24cc535098a59cdb502a22 (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
//-----------------------------------------------------------------------
// <copyright file="AzureADHeader.cs" company="Microsoft">
// Copyright (c) Microsoft. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.ApplicationBlock
{
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
/// <summary>
/// Contains header of AzureAD JWT token.
/// </summary>
/// <remarks>
/// Technically, this class doesn't need to be public, but because we want to make it serializable in medium trust, it has to be public.
/// </remarks>
[DataContract]
[EditorBrowsable(EditorBrowsableState.Never)]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "AzureAD", Justification = "Brand name")]
public class AzureADHeader
{
#region Public Properties
/// <summary>
/// Gets or sets the type of token. Will always be JWT
/// </summary>
/// <value> The type of token. </value>
[DataMember(Name = "typ")]
public string Typ { get; set; }
/// <summary>
/// Gets or sets the algo of the header.
/// </summary>
/// <value> The algo of encoding. </value>
[DataMember(Name = "alg")]
public string Alg { get; set; }
/// <summary>
/// Gets or sets the thumbprint of the header.
/// </summary>
/// <value> The thumbprint of the cert used to encode. </value>
[DataMember(Name = "x5t")]
public string X5t { get; set; }
#endregion
}
}
|