구글 퍼미션 정책이 변경되면서 구글 인증의 방식이 바뀌었다


기존에는 

1. 클라이언트가 access_token을 발급

2. 서버가 access_token을 이용하여 유저 정보 획득

https://www.googleapis.com/oauth2/v3/tokeninfo


혹은 

1. 클라이언트가 auth_code 발급

2. 서버가 auth_code를 이용하여 access_token과 id_token 발급

https://www.googleapis.com/oauth2/v4/token

https://www.googleapis.com/oauth2/v3/tokeninfo



기존 방법들은 클라이언트에서 유저에게 권한을 획득 해야 했다.



이번에 바뀐것은

서버가 auth_code를 통해 id_token을 획득할 수 없다

1. 클라이언트가 auth_code 발급

2. 서버가 auth_code로 access_token 획득

https://www.googleapis.com/oauth2/v4/token

3. access_token을 통해 google id 획득 이다.

https://www.googleapis.com/games/v1/applications/<application id>/verify






http://android-developers.blogspot.kr/2016/01/play-games-permissions-are-changing-in.html

'Develop' 카테고리의 다른 글

iis express 다른 pc에서 접속  (0) 2016.08.24
iis express 64 bit  (0) 2016.08.24
mysql procedure 내 문자열 검색  (0) 2016.07.29
javascript file loading  (0) 2016.07.25
Bootstrap less 404  (0) 2016.06.28

         


      


'etc' 카테고리의 다른 글

중국 클라우드 서비스 종료  (0) 2016.10.25
9월의 양양 서핑, 캠프  (0) 2016.09.26
[링크] 부스트  (0) 2009.11.20
[독서] 1분경영  (0) 2009.11.19
윈도우 종료 명령어  (0) 2009.11.11

mysql에서 procedure, function에 있는 스트링을 검색하고 싶다.


1. 하나씩 다 열어본다

2. dump 떠서 검색해본다

3. 아래 쿼리를 이용한다.


SELECT ROUTINE_SCHEMA, ROUTINE_NAME FROM information_schema.routines WHERE LOWER(ROUTINE_DEFINITION) LIKE '%_cast_%';


신세계... 역시 공부를 해야





이상하게 글쓰는데 똑같은걸 이미 한적이 있는거 같은 느낌이

'Develop' 카테고리의 다른 글

iis express 64 bit  (0) 2016.08.24
구글 연동  (0) 2016.08.18
javascript file loading  (0) 2016.07.25
Bootstrap less 404  (0) 2016.06.28
Mysql AES_Encrypt  (0) 2016.06.27
<html>
	<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
	<script>   
	   function upload()
	   {
		  
		  $('#hiddenUploadBtn').click();
	   }
	   function fileOpen(evt)
	   {
			var tagStr = '<p>' + evt.target.files[0].name + '</p>';
			
			$('#container').append(tagStr);
			handleFiles(evt.target.files);
	   }
	   $(document).ready(function(){
			$('#hiddenUploadBtn').change(fileOpen);
	   });
	   
	   function handleFiles(files) {
		  // Check for the various File API support.
		  if (window.FileReader) {
			  // FileReader are supported.
			  getAsText(files[0]);
		  } else {
			  alert('FileReader are not supported in this browser.');
		  }
		}

		function getAsText(fileToRead) {
		  var reader = new FileReader();
		  // Read file into memory as UTF-8      
		  reader.readAsText(fileToRead);
		  // Handle errors load
		  reader.onload = loadHandler;
		  reader.onerror = errorHandler;
		}

		function loadHandler(event) {
		  var csv = event.target.result;
		  processData(csv);
		}

		function processData(csv) {
			var allTextLines = csv.split(/\r\n|\n/);
			var lines = [];
			for (var i=0; i<allTextLines.length; i++) {
				var data = allTextLines[i].split(',');
					var tarr = [];
					for (var j=0; j<data.length; j++) {
						tarr.push(data[j]);
					}
					
					lines.push(tarr);
				var tagStr = '<p>' + allTextLines[i] + '</p>';
				$('#container').append(tagStr);
			}
		  console.log(lines);
		}

		function errorHandler(evt) {
		  if(evt.target.error.name == "NotReadableError") {
			  alert("Canno't read file !");
		  }
		}
	   
	</script>
	<form name="kk">
	   <input type="button" value="업로드" onClick="upload()">
	   
	</form>

	<div style="display:none">
	   <form name="hiddenFrm" id="hiddenFrm">
		  <input type="file" id="hiddenUploadBtn">
	   </form>
	</div>
	<div id="container">

	</div>
</html>





참조
http://mounirmesselmeni.github.io/2012/11/20/reading-csv-file-with-javascript-and-html5-file-api/


'Develop' 카테고리의 다른 글

구글 연동  (0) 2016.08.18
mysql procedure 내 문자열 검색  (0) 2016.07.29
Bootstrap less 404  (0) 2016.06.28
Mysql AES_Encrypt  (0) 2016.06.27
powershell web 관련 명령어  (0) 2016.06.02

환경


IIS 

Asp.Net

BootStrap


문제상황


브라우져에서 디버깅 모드로 가면

less 폴더 이하의 모든 파일 404 에러

.woff2 파일 404 에러


해결방법


1. web.config 수정

  <system.webServer>
    <staticContent>
      <remove fileExtension=".woff" />
      <remove fileExtension=".woff2" />
      <remove fileExtension=".less" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
      <mimeMap fileExtension=".less" mimeType="text/css" />
    </staticContent>
    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>


2. IIS Manager에서 site에서 폴더 권한 설정

   site 선택 -> Edit Permissions -> Security -> Edit -> Add -> Everyone 계정 추가, 권한은 list folder contents, read -> apply



'Develop' 카테고리의 다른 글

mysql procedure 내 문자열 검색  (0) 2016.07.29
javascript file loading  (0) 2016.07.25
Mysql AES_Encrypt  (0) 2016.06.27
powershell web 관련 명령어  (0) 2016.06.02
powershell 폴더구조 복사  (0) 2016.06.02

Mysql

IF	pi_actiontype = 'E' THEN SET PO_STR := TO_BASE64(AES_ENCRYPT(pi_str, v_SecKey));
ELSEIF	pi_actiontype = 'D' THEN SET PO_STR := AES_DECRYPT(FROM_BASE64(pi_str),v_SecKey);


C#

    public static class AESCipherMysql
    {
        public static String AES_encrypt(String Input, string key)
        {
            RijndaelManaged aes = new RijndaelManaged();
            aes.KeySize = 128;
            aes.BlockSize = 128;
            aes.Mode = CipherMode.ECB;
            aes.Padding = PaddingMode.PKCS7;
            aes.Key = Encoding.UTF8.GetBytes(key);
            aes.IV = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

            var encrypt = aes.CreateEncryptor(aes.Key, aes.IV);
            byte[] xBuff = null;
            using (var ms = new MemoryStream())
            {
                using (var cs = new CryptoStream(ms, encrypt, CryptoStreamMode.Write))
                {
                    byte[] xXml = Encoding.UTF8.GetBytes(Input);
                    cs.Write(xXml, 0, xXml.Length);
                    cs.FlushFinalBlock();
                }

                xBuff = ms.ToArray();
            }

            String output = Convert.ToBase64String(xBuff);
            return output;
        }

        public static String AES_decrypt(String Input, string key)
        {
            RijndaelManaged aes = new RijndaelManaged();
            aes.KeySize = 128;
            aes.BlockSize = 128;
            aes.Mode = CipherMode.ECB;
            aes.Padding = PaddingMode.PKCS7;
            aes.Key = Encoding.UTF8.GetBytes(key);
            aes.IV = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

            var decrypt = aes.CreateDecryptor();
            byte[] encryptedStr = Convert.FromBase64String(Input);

            byte[] xBuff = new byte[encryptedStr.Length];
            using (var ms = new MemoryStream(encryptedStr))
            {
                using (var cs = new CryptoStream(ms, decrypt, CryptoStreamMode.Read))
                {
                    cs.Read(xBuff, 0, xBuff.Length);
                }
            }

            String output = Encoding.UTF8.GetString(xBuff);
            return output;
        }
    }
    

'Develop' 카테고리의 다른 글

javascript file loading  (0) 2016.07.25
Bootstrap less 404  (0) 2016.06.28
powershell web 관련 명령어  (0) 2016.06.02
powershell 폴더구조 복사  (0) 2016.06.02
powershell 'c:\program files'  (0) 2016.06.02

파워쉘에서 웹서비스를 만져보자


웹사이트 끄고 켜기

Start-WebSite $appName

Stop-WebSite $appName


웹사이트 풀 끄고 켜기

Start-WebAppPool $appName

Stop-WebAppPool $appName


웹사이트 상태

$webSite = Get-Website $appName

Write-Host $webSite.State, $webSite.PSComputerName


웹사이트 포트를 알아내서 접속

$WebBinding = Get-WebBinding -Name $appName

$port = $WebBinding.bindingInformation.Split(":")[1]

$url = "http://localhost:" + $port

& 'C:\Program Files\Internet Explorer\iexplore.exe' $url



경험상 웹사이트를 껐다 켠다고 새로 패치한 dll(asp.net)이 먹히지 않더라.

웹사이트 풀을 끄고 켜는걸 권장함

 

'Develop' 카테고리의 다른 글

Bootstrap less 404  (0) 2016.06.28
Mysql AES_Encrypt  (0) 2016.06.27
powershell 폴더구조 복사  (0) 2016.06.02
powershell 'c:\program files'  (0) 2016.06.02
android gcm push  (0) 2016.05.25

Copy-Item $src -Destination $dest -Force -Recurse 


강려크 하게 복사

'Develop' 카테고리의 다른 글

Mysql AES_Encrypt  (0) 2016.06.27
powershell web 관련 명령어  (0) 2016.06.02
powershell 'c:\program files'  (0) 2016.06.02
android gcm push  (0) 2016.05.25
mysql grants  (0) 2016.05.25

& 'C:\Program Files\Git\cmd\git' pull


& 쓰면 된다

'Develop' 카테고리의 다른 글

powershell web 관련 명령어  (0) 2016.06.02
powershell 폴더구조 복사  (0) 2016.06.02
android gcm push  (0) 2016.05.25
mysql grants  (0) 2016.05.25
c# mysqlclient output parameter  (0) 2016.05.25

방법 1


curl --header "Authorization: key=appkey" --header Content-Type:"application/json" https://gcm-http.googleapis.com/gcm/send -d "{\"data\":{},\"to\":\"target\"}"



방법 2


node.js 사용 (첨부파일)


gcm.zip


'Develop' 카테고리의 다른 글

powershell 폴더구조 복사  (0) 2016.06.02
powershell 'c:\program files'  (0) 2016.06.02
mysql grants  (0) 2016.05.25
c# mysqlclient output parameter  (0) 2016.05.25
SyntaxHighlighter brushes  (0) 2016.05.24

+ Recent posts