diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 15:36:55 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 15:36:55 -0700 |
commit | 49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c (patch) | |
tree | 9b836b0b9e94b8aa1e650c68e714bc214439d8da /samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs | |
parent | 7edb0a63ef796af300c670ce90df8e7670930a10 (diff) | |
parent | 489bf70111fe4839e87fa591928d2845341f0059 (diff) | |
download | DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.zip DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.tar.gz DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.tar.bz2 |
Adds Azure Active Directory OAuth 2 client.
Closes #271
Diffstat (limited to 'samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs')
-rw-r--r-- | samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs b/samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs new file mode 100644 index 0000000..532c405 --- /dev/null +++ b/samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs @@ -0,0 +1,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 + } +} |