summaryrefslogtreecommitdiffstats
path: root/samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs
diff options
context:
space:
mode:
authorGirish Bablani <girishb@microsoft.com>2013-04-16 18:53:13 -0700
committerGirish Bablani <girishb@microsoft.com>2013-04-16 18:53:13 -0700
commit789f14adf18e65ab416b60341bfbecc6577a1c37 (patch)
tree3f140b5f1679cb2857cd65a7d14d2c0ec28f2fca /samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs
parent9e33a9e89ba1973cb3bf923e1303105047094d9c (diff)
downloadDotNetOpenAuth-789f14adf18e65ab416b60341bfbecc6577a1c37.zip
DotNetOpenAuth-789f14adf18e65ab416b60341bfbecc6577a1c37.tar.gz
DotNetOpenAuth-789f14adf18e65ab416b60341bfbecc6577a1c37.tar.bz2
Enabled AzureAD integration and added TestAzureAD sample app
Diffstat (limited to 'samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/AzureADHeader.cs51
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
+ }
+}