예제 #1
0
        public static ProvideAuthToken AdminAuthTokenProvider()
        {
            Maybe <AuthToken> authToken;
            var devSettings = DevSettingsSerialization.Deserialize();

            if (devSettings.IsJust)
            {
                authToken = Maybe.Just(Authentication.AdminAuthToken(devSettings.Value.AdminUsername, devSettings.Value.AdminPassword));
            }
            else
            {
                authToken = Maybe.Nothing <AuthToken>();
            }

            return(() => authToken);
        }