Skip to content

Instantly share code, notes, and snippets.

View nmfisher's full-sized avatar

Nick Fisher nmfisher

View GitHub Profile
using Lexico.DataModel;
using Lexico.DataModel.Questionnaire;
using Lexico.Search.NETStandard;
using Lexico.Web.Multitenancy.NET461;
using Lexico.Web.Multitenancy.NET461.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
var hwndSource = HwndSource.FromHwnd(handle);
if (hwndSource != null)
{
hwndSource.AddHook(WindowProc);
}
WinAPI.ShowWindowAsync(new WindowInteropHelper(OverlayForm).Handle, 0);
private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
@nmfisher
nmfisher / gist:99da9741c440cd460129
Created July 1, 2015 00:24
Custom AuthenticationHandler for CAS using Bcrypt (standard password encoding algorithm used by Grails spring security plugin)
package com.clearframe.cas;
import java.security.GeneralSecurityException;
import java.util.Map;
import javax.security.auth.login.FailedLoginException;
import javax.validation.constraints.NotNull;
import org.jasig.cas.adaptors.jdbc.AbstractJdbcUsernamePasswordAuthenticationHandler;
import org.jasig.cas.authentication.UsernamePasswordCredential;
import org.jasig.cas.authentication.HandlerResult;
import org.jasig.cas.authentication.PreventedException;