This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class Startup | |
{ | |
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 | |
public void ConfigureAuth(IAppBuilder app) | |
{ | |
/*app.UseWindowsAzureActiveDirectoryBearerAuthentication( | |
new WindowsAzureActiveDirectoryBearerAuthenticationOptions | |
{ | |
Audience = ConfigurationManager.AppSettings["ida:Audience"], | |
Tenant = ConfigurationManager.AppSettings["ida:Tenant"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ADFS 4.0 | |
/*private static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"]; | |
private static string tenant = ConfigurationManager.AppSettings["ida:Tenant"]; | |
private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"]; | |
Uri redirectUri = new Uri(ConfigurationManager.AppSettings["ida:RedirectUri"]); | |
private static string authority = String.Format(CultureInfo.InvariantCulture, aadInstance, tenant);*/ | |
private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"]; | |
Uri redirectUri = new Uri(ConfigurationManager.AppSettings["ida:RedirectUri"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |
</startup> | |
<appSettings> | |
<!--ADFS 4.0--> | |
<add key="ida:ClientId" value="bee24b9a-13ac-45fc-988c-8cce06160c07" /> | |
<add key="ida:AppKey" value="wp...nE" /> | |
<add key="todo:TodoListResourceId" value="https://localhost:44326/NativeTodoListService" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.IdentityModel.Protocols; | |
using System; | |
using System.IO; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
// Per https://azure.microsoft.com/en-us/documentation/articles/active-directory-b2c-devquickstarts-web-dotnet/ | |
namespace Host.Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": [], | |
"info": { | |
"name": "ADFS Public - Implicit - ADFS 4.0 Release", | |
"_postman_id": "44d70984-95c6-375e-af63-ff5bd98e8238", | |
"description": "", | |
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" | |
}, | |
"item": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Swashbuckle; | |
using Swashbuckle.Swagger; | |
using System.Web.Http.Description; | |
namespace TodoListService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": [], | |
"info": { | |
"name": "Maths WebAPI", | |
"_postman_id": "47568f67-6685-f39a-8d7f-2cd76a9b281a", | |
"description": "", | |
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" | |
}, | |
"item": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void button1_Click(object sender, EventArgs e) | |
{ | |
System.Net.Mail.MailMessage mailMessage = new System.Net.Mail.MailMessage(); | |
try | |
{ | |
mailMessage.From = new System.Net.Mail.MailAddress("me@help.com", "me@Sender.com"); | |
mailMessage.To.Add("my-email"); | |
mailMessage.Subject = "Hullo"; | |
mailMessage.Body = "This is a test"; | |
mailMessage.IsBodyHtml = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Swashbuckle; | |
using Swashbuckle.Swagger; | |
using System.Web.Http.Description; | |
namespace TodoListService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": [], | |
"info": { | |
"name": "ADFS My IIS", | |
"_postman_id": "f2145f47-b93d-b35a-5707-c115e866bf2b", | |
"description": "Auth code flow.", | |
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" | |
}, | |
"item": [ | |
{ |
OlderNewer