public static Sts CreateSts(StsType stsType) { Sts sts; switch (stsType) { case StsType.ADFS: sts = new AdfsSts(); break; case StsType.AADFederatedWithADFS3: sts = new AadFederatedWithAdfs3Sts(); break; case StsType.AAD: sts = new AadSts(); break; case StsType.AdfsPasswordGrant: sts = new AdfsPasswordGrantSts(); break; case StsType.AadPasswordGrant: sts = new AadPasswordGrantSts(); break; default: throw new ArgumentException(string.Format("Unsupported STS type '{0}'", stsType)); } return sts; }
public static Sts CreateSts(StsType stsType) { Sts sts; switch (stsType) { case StsType.ADFS: sts = new AdfsSts(); break; case StsType.AADFederatedWithADFS3: sts = new AadFederatedWithAdfs3Sts(); break; case StsType.AAD: sts = new AadSts(); break; case StsType.AdfsPasswordGrant: sts = new AdfsPasswordGrantSts(); break; case StsType.AadPasswordGrant: sts = new AadPasswordGrantSts(); break; default: throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, " Unsupported STS type '{0}'", stsType)); } return(sts); }
public static Sts CreateSts(StsType stsType) { Sts sts; switch (stsType) { case StsType.ADFS: sts = new AdfsSts(); break; case StsType.AADFederatedWithADFS3: sts = new AadFederatedWithAdfs3Sts(); break; case StsType.AAD: sts = new AadSts(); break; default: throw new ArgumentException(string.Format("Unsupported STS type '{0}'", stsType)); } return sts; }
public static Sts CreateSts(StsType stsType) { Sts sts = null; if (stsType == StsType.ADFS) { sts = new AdfsSts(); } else if (stsType == StsType.AADFederatedWithADFS3) { sts = new AadFederatedWithAdfs3Sts(); } else if (stsType == StsType.AAD) { sts = new AadSts(); } else { throw new ArgumentException(string.Format("Unsupported STS type '{0}'", stsType)); } return(sts); }