Skip to content

Instantly share code, notes, and snippets.

using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace JetStreamCore.Web.Pages
{
public static class SelectListItemExtensions
{
public class CustomAuthenticationProvidersInitializer : AuthenticationProvidersInitializer
{
public override Dictionary<string, Action<IAppBuilder, string, AuthenticationProviderElement>> GetAdditionalIdentityProviders()
{
var providers = base.GetAdditionalIdentityProviders();
// 'CustomSTS' is the name of the external authentication provider as configured in the Advanced settings
providers.Add("CustomSTS", (IAppBuilder app, string signInAsType, AuthenticationProviderElement providerConfig) =>
{
// You can add any parameter in the configuration. We use this as an example.
{
"results": [
{
"common.locale": "en_US",
"common.client_id": 1073741832,
"common.sd_card_encrypted": false,
"user.last_admin_portal_login_time": "1970-01-01T00:00:00.000Z",
"ios.osUpdateStatus": "Unsupported",
"ios.Supervised": false,
"common.device_space_name": "Global",
@lloydkevin
lloydkevin / default_template.json
Last active January 9, 2017 16:59
Elasticsearch Default Single Node health (number_of_replicas: 0)
put _template/default
{
"template": "*",
"settings": {
"index": {
"number_of_replicas": "0"
}
}
}
@lloydkevin
lloydkevin / BindablePicker.cs
Last active August 5, 2016 23:15
BindablePicker Example
using System;
using System.Collections;
using System.Reflection;
using Xamarin.Forms;
namespace JetStreamXamarin.Controls
{
/// <summary>
/// Source from:
/// https://oceanware.wordpress.com/2016/06/13/xamarin-forms-bindable-picker/