Skip to content

Instantly share code, notes, and snippets.

View mfcollins3's full-sized avatar

Michael Collins mfcollins3

View GitHub Profile
@mfcollins3
mfcollins3 / AppDelegate_1.swift
Last active March 3, 2024 00:06
Creating Multiple Scenes in a SwiftUI App
import UIKit
final class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) {
if let userActivity = options.userActivities.first {
switch userActivity.activityType {
@mfcollins3
mfcollins3 / NeuronEsbBlock.cs
Created July 18, 2013 18:12
Sample TPL Dataflow block that shows a custom dataflow block for Neuron ESB parties. The NeuronEsbBlock class can be used either as a source block or a target block in a dataflow pipeline.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
using Neuron.Esb;
public sealed class NeuronEsbBlock : IDisposable,
IPropagatorBlock<ESBMessage, ESBMessage>,
IReceivableSourceBlock<ESBMessage>
@mfcollins3
mfcollins3 / login.xml
Created January 21, 2022 18:51
Log in user journey for B2C
<UserJourneys>
<UserJourney Id="LogIn">
<OrchestrationSteps>
<OrchestrationStep Order="1" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="ShowLogInForm" TechnicalProfileReferenceId="ShowLogInForm" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JWTIssuer" />
</OrchestrationSteps>
@mfcollins3
mfcollins3 / login.xml
Last active January 21, 2022 17:25
Log in relying party policy for B2C
<RelyingParty>
<DefaultUserJourney ReferenceId="LogIn" />
<UserJourneyBehaviors>
<JourneyInsights
TelemetryEngine="ApplicationInsights"
InstrumentationKey="7c25e293-8d7e-46c8-9e84-39400c53f1fb"
DeveloperMode="true"
ClientEnabled="true"
ServerEnabled="true"
TelemetryVersion="1.0.0" />
@mfcollins3
mfcollins3 / login.xml
Created January 21, 2022 15:18
Starter skeleton for the B2C log in custom policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrustFrameworkPolicy
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06"
PolicySchemaVersion="0.3.0.0"
TenantId="projectcenterdev.onmicrosoft.com"
PolicyId="B2C_1A_LogIn"
PublicPolicyUri="http://projectcenterdev.onmicrosoft.com/B2C_1A_LogIn"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights">
<BasePolicy>
@mfcollins3
mfcollins3 / signup.xml
Created January 21, 2022 14:48
Updated sign up policy for B2C that inherits from base
<TrustFrameworkPolicy
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06"
PolicySchemaVersion="0.3.0.0"
TenantId="projectcenterdev.onmicrosoft.com"
PolicyId="B2C_1A_SignUp"
PublicPolicyUri="http://projectcenterdev.onmicrosoft.com/B2C_1A_SignUp"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights">
<BasePolicy>
<TenantId>projectcenterdev.onmicrosoft.com</TenantId>
@mfcollins3
mfcollins3 / base.xml
Created January 21, 2022 14:47
Base policy for B2C
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrustFrameworkPolicy
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06"
PolicySchemaVersion="0.3.0.0"
TenantId="projectcenterdev.onmicrosoft.com"
PolicyId="B2C_1A_Base"
PublicPolicyUri="http://projectcenterdev.onmicrosoft.com/B2C_1A_Base">
</TrustFrameworkPolicy>
@mfcollins3
mfcollins3 / signup.xml
Last active January 21, 2022 06:50
Simple Relying Party Policy for Azure AD B2C
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrustFrameworkPolicy
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06"
PolicySchemaVersion="0.3.0.0"
TenantId="projectcenterdev.onmicrosoft.com"
PolicyId="B2C_1A_SignUp"
PublicPolicyUri="http://projectcenterdev.onmicrosoft.com/B2C_1A_SignUp"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights">
@mfcollins3
mfcollins3 / signup.xml
Created January 21, 2022 06:36
Starter local user sign up relying party policy for B2C
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrustFrameworkPolicy
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06"
PolicySchemaVersion="0.3.0.0"
TenantId="projectcenterdev.onmicrosoft.com"
PolicyId="B2C_1A_SignUp"
PublicPolicyUri="http://projectcenterdev.onmicrosoft.com/B2C_1A_SignUp"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights">
<BuildingBlocks>
@mfcollins3
mfcollins3 / signup.xml
Created January 21, 2022 06:17
JWTIssuer technical profile for B2C
<ClaimsProvider>
<DisplayName>Token Issuers</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="JWTIssuer">
<DisplayName>JWT Issuer</DisplayName>
<Description>Generates and issues the JSON web token containing the user's identity information</Description>
<Protocol Name="OpenIdConnect" />
<OutputTokenFormat>JWT</OutputTokenFormat>
<Metadata>
<Item Key="issuer_refresh_token_user_identity_claim_type">objectId</Item>