<commit_before>﻿using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using AssemblyCSharp;

public class AzureAuthentication  {
	
	public class AuthenticationToken
	{
	}
	public class FacebookGoogleAuthenticationToken : AuthenticationToken
	{
		public string access_token;
	}
	public class MicrosoftAuthenticationToken : AuthenticationToken
	{
		public string authenticationToken;
	}

	public enum AuthenticationProvider
	{
		// Summary:
		//     Microsoft Account authentication provider.
		MicrosoftAccount = 0,
		//
		// Summary:
		//     Google authentication provider.
		Google = 1,
		//
		// Summary:
		//     Twitter authentication provider.
		Twitter = 2,
		//
		// Summary:
		//     Facebook authentication provider.
		Facebook = 3,
	}

//	private string ServerAddress = "";

	private Action<string,WWW> Callback_Success;
	private Action<string,WWW> Callback_Error;

	public void Login(AuthenticationProvider provider, string ServerAddress, string token, Action<string, WWW> callback_success, Action<string, WWW> callback_error){
		var path = ".auth/login/" + provider.ToString().ToLower();

		AuthenticationToken authToken = CreateToken(provider, token);

		var json = JsonParser.Write(authToken);
		//print (json);

		Callback_Success = callback_success;
		Callback_Error = callback_error;

		WWWHelper helper = WWWHelper.Instance;
		helper.OnHttpRequest += OnHttpRequest;
<commit_msg>Azure login redirect Source Code<commit_after>﻿using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using AssemblyCSharp;

public class AzureAuthentication  {
	
	public class AuthenticationToken
	{
	}
	public class FacebookGoogleAuthenticationToken : AuthenticationToken
	{
		public string access_token;
	}
	public class MicrosoftAuthenticationToken : AuthenticationToken
	{
		public string authenticationToken;
	}

	public enum AuthenticationProvider
	{
		// Summary:
		//     Microsoft Account authentication provider.
		MicrosoftAccount = 0,
		//
		// Summary:
		//     Google authentication provider.
		Google = 1,
		//
		// Summary:
		//     Twitter authentication provider.
		Twitter = 2,
		//
		// Summary:
		//     Facebook authentication provider.
		Facebook = 3,
	}

	private Action<string,WWW> Callback_Success;
	private Action<string,WWW> Callback_Error;

	public void Login(AuthenticationProvider provider, string ServerAddress, string token, Action<string, WWW> callback_success, Action<string, WWW> callback_error){
		var path = ".auth/login/" + provider.ToString().ToLower();

		AuthenticationToken authToken = CreateToken(provider, token);

		var json = JsonParser.Write(authToken);
		//print (json);

		Callback_Success = callback_success;
		Callback_Error = callback_error;

		WWWHelper helper = WWWHelper.Instance;
		helper.OnHttpRequest += OnHttpRequest;

{'fraction_non_alphanumeric': 0.08906030855539972, 'fraction_numerical': 0.002805049088359046, 'mean_word_length': 4.244485294117647, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5100094', 'n_tokens_mistral': 845, 'n_tokens_neox': 768, 'n_words': 207}