You cannot see this page without javascript.

Skip to content

Home

조회 수 1824 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

https://www.xpressengine.com/index.php?mid=download&package_id=22753522

LginXE Server ver 1.02를 이용하여 하였다

해당 화일은 loginxeserver.view.php 이다

    elseif($service=='github')
    {
      if(!isset($module_config->githubclientid) || $module_config->githubclientid=='' || !isset($module_config->githubclientkey) || $module_config->githubclientkey=='')
      {
        Context::set('url',getNotEncodedUrl('','module','loginxeserver','act','dispLoginxeserverOAuthFinish','error','1','message','loginxe_not_finished_setting'));
        return;
      }
      Context::set('url','https://github.com/login/oauth/authorize?client_id=' . $module_config->githubclientid . '&redirect_uri=' . urlencode(getNotEncodedFullUrl('','module','loginxeserver','act','dispLoginxeserverOAuthFinish','provider','github','callback','')) . '&state=' . $state . '&scope=user');
      //Context::set('url',getNotEncodedUrl('','module','loginxeserver','act','dispLoginxeserverOAuthFinish','error','1','message','loginxe_not_implemented'));

      return;
    }



위와 같은 소스 밑에 아래 같이 추가


elseif($service=='kakao') //   카카오 로그인을 위한것 myceo수정
    {
      if(!isset($module_config->kakaoclientid) || $module_config->kakaoclientid=='' || !isset($module_config->kakaoclientkey) || $module_config->kakaoclientkey=='')
      {
        Context::set('url',getNotEncodedUrl('','module','loginxeserver','act','dispLoginxeserverOAuthFinish','error','1','message','loginxe_not_finished_setting'));
        return;
      }
      Context::set('url','https://kauth.kakao.com/oauth/authorize?client_id=' . $module_config->kakaoclientid . '&response_type=code&redirect_uri=' . urlencode(getNotEncodedFullUrl('','module','loginxeserver','act','dispLoginxeserverOAuthFinish','provider','kakao','callback','')) . '&state=' . $state);
      //Context::set('url',getNotEncodedUrl('','module','loginxeserver','act','dispLoginxeserverOAuthFinish','error','1','message','loginxe_not_implemented'));

      return;
    }


또 밑에 쭈~~욱 보면


    elseif($service=='github')
    {
      //API 서버에 code와 state값을 보내 인증키를 받아 온다
      $ping_url = 'https://github.com/login/oauth/access_token';
      $ping_header = array();
      $ping_header['Host'] = 'github.com';
      $ping_header['Pragma'] = 'no-cache';
      $ping_header['Accept'] = 'application/json';

      $request_config = array();
      $request_config['ssl_verify_peer'] = false;

      $buff=FileHandler::getRemoteResource($ping_url, null, 10, 'POST', 'application/x-www-form-urlencoded', $ping_header, array(), array('client_id'=>$module_config->githubclientid,'client_secret'=>$module_config->githubclientkey,'code'=>$code), $request_config);
      $data=json_decode($buff);
      debugPrint($buff);
    }


위와 같은 소스 밑에 카카오 로그인시 토큰 받아오기를 했다

elseif($service=='kakao')// 카카오 로그인을 위한것 myceo수정
    {
      //API 서버에 clientid를 보내서 code값을 받아 온다
	 $REDIRECT_URI=urlencode('http://www.myceo.co.kr/index.php?module=loginxeserver&act=dispLoginxeserverOAuthFinish&provider=kakao');
	 $ping_url = 'https://kauth.kakao.com/oauth/token?client_id=' . $module_config->kakaoclientid . '&redirect_uri=' . $REDIRECT_URI . '&grant_type=authorization_code&state=' . $state . '&code=' . $code;
	 $ping_header = array();
     $ping_header['Host'] = 'kauth.kakao.com';
     $request_config = array();
     $request_config['ssl_verify_peer'] = false;

      $buff = FileHandler::getRemoteResource($ping_url, null, 10, 'POST', 'application/json', $ping_header, array(), array(), $request_config);
      $data= json_decode($buff);
	  debugPrint($buff);
    }


이렇게 하면 일단 token는 받아 온다

정리가 되는 되로 loginxeclient.class.php도 올리여 겠다


소스 화일이 이상하면 댓글좀 달아 주삼~


  연관된글

  • No Image

    카카오 드라이버 '갈등' 재점화?..反 카카오 시위 예고

  • '카카오 드라이버' 영업하게 해달라… 가처분 사건 11월 결론

  • 로지소프트(바나플)송민기사장,국정감사 증인불참

  • No Image

    카카오, 지지부진한 주가 언제까지?


(안심) 짧은 주소는 : 입니다
?

List of Articles
번호 제목 날짜 조회 수
27 카운터스킨에 총게시물수랑 댓글수 알아내기 /widgets/counter_status/counter_status.class.php // 가입한 회원수 출력 $oMemberModel = &getModel('member'); $args->date = date("Ymd000000",... 2017.03.07 309
26 글쓰기&읽기 권한 없을때 로그인창으로 강제 이동법 modules/board/board_view.php 파일에서 function alertMessage($message) //이 함수를 변경하면 된다. function alertMessage($message) { if($message=="msg_no... 2015.12.18 5211
25 글쓰기 할때 자동으로 테그값을 글제목의 단어를 공간체크 하여 태그 입력되게 function triggerArrangeTag(&$obj) // <-- 요부분 밑에 { // if(!$obj->tags) return new Object(); 이부분을 주석처리 if(!$obj->tags && $obj->t... 2015.12.18 614
24 게시물에 링크(Link) 있을때 새창으로 보여 주기 jQuery(function(){ jQuery('.xe_content[class^=document_] a').attr('target', '_blank'); }); jQuery(function(){ jQuery('.xe_content[class^=comment_] a').... 2015.04.16 509
23 NaverWorks 도메인 메일 사용시 XE에서 인증메일 보내는 방법 classes/mail/Mail.class.php 화일에서 fonction mail(){ $this->useNaverAccount("아이디@등록한도메인", "*비밀번호); // 이 한줄만 추가하면 됩니다.Myceo... ... 2015.04.09 845
22 setitle2.addon.php에서 category 명 같이 나오게... title바꾸기 /addons/setitle2/setitle2.addon.php 화일을 수정한다 $pointconfig = $module->getModuleConfig('point'); //각종 정보 담아오기 //아래는 수정 추가 한것이다.... 2015.04.07 1061
21 atom10.html 변경하여 게시판이름-게시물-기본타이틀명 나오게 {'<?xml version="1.0" encoding="UTF-8" ?>'} <feed xmlns="http://webmastertool.naver.com"> <id>{$info->link}</id> <title>{$info->title}</title> <author>... 2015.04.03 691
20 네이버 신디케이션 사용자 가이드 NAVER Syndication User Guide `` `` 2 저작권 Copyright © NAVER Corp. All Rights Reserved. 이 문서는 네이버(주)의 지적 재산이므로 어떠한 경우에도 네이버(주)의 공식적인 허가 없이 이 ... 1 2015.04.01 1728
19 신디케이션 ver 4.0을 사용시에 타이틀이 제대로 나오지 않을경우 modules/syndication/syndication.model.php 여기 화일중에.. case 'site' : $site_info = new stdClass; $site_info->id = $this->getID('site'); $site_info->s... 1 2015.03.28 497
18 [XE]Layouts 모듈이 Layout 을 파싱하는 시점에 전달해 주는 변수 및 데이터 덤프 Array ( [buff] => file://./files/cache/template_compiled/99b4a68c4de6bdf7b15cc072553a8c7c.compiled.php [__Context] => stdClass Object ( [lang] => stdC... 2015.02.14 106179
» 카카오 API 로그인 연동하여 토큰 받아오기 https://www.xpressengine.com/index.php?mid=download&package_id=22753522 LginXE Server ver 1.02를 이용하여 하였다 해당 화일은 loginxeserver.view.php... 2015.02.14 1824
16 logged_info 정보 $logged_info->member_srl : 회원의 고유 번호. 중복 X $logged_info->user_id : 아이디 $logged_info->email_address : 메일 주소 $logged_info->passwrod : 비... 2015.02.12 342
15 XE에서 태그값이 없으면 제목의 공간을 이용해 자동 태그값 넣기 /modules/tag/tag.controller.php 중에서 function triggerArrangeTag(&$obj) { // if(!$obj->tags) return new Object(); 2015-02-10(화)_myceo 이부분을 ... 2015.02.11 432
14 XE $module_info 변수 추출 결과 레이아웃에서 아래와 같이 해서 뽑아온 변수 정보 {print_r($module_info)} 대충 각 모듈별로 레이아웃을 구성할 때는 아래의 module 정보를 빼내오는 것이 가장 ... 2015.01.28 822
13 "이 페이지 나가기" 경고창이 뜨는 사이트의 경우 common / js / jquery.min.js 파일을 열어서 global:!0 을 찾은 후(두 군데) global:!1 로 바꿔줍니다. 보통의 경우엔 바꿔주지 않아도 뜨지 않는 경고창이지만 ... 2015.01.15 6415
12 인증메일이 발송 되지 않을때 /classes/mail/Mail.class.php 에서 약 140번째 라인에 보면 function Mail() { } 여기 부분을 function Mail() { $this->useGmailAccount("구글아이디@gmail.com... 2015.01.13 482
11 다양한 카운터 위젯 그림및 소스 참조 <?php /* Copyright (C) NAVER <http://www.navercorp.com> */ /** * @class counter_status * @author NAVER (developers@xpressengine.com) * @version 0.1 * @... file 2015.01.07 286
10 각종 API 적용(밴드,카카오톡,카카오스토리,마이피플) <?php if(!defined("__ZBXE__")) exit(); if(Context::getResponseMethod() == "XMLRPC" || Context::get('module') == "admin") return; if($called_position !=... 2 2014.11.26 23101
9 특정 이메일 가입 않되게 (인증메일 관련) 인증메일 때문에... 특정 사이트로는 인증메일이 않들어가지는 부분을 해결하고자 다음과 같이 수정 하였다 /modules/member/member.controller.php 이 화일을 열... 2014.08.06 4764
8 XE보드 회원가입시 가입 아이피 기록하기 modules/member/member.controller.php 열기 // Insert data into the DB 찾기 // Insert data into the DB $args->list_order = -1 * $args->member_srl; $args-... 2014.07.23 2332
Board Pagination Prev 1 2 Next
/ 2

전체 방문자 : 1,166,353 오늘 : 43 어제 : 169 문서 : 0 댓글 : 0
전체회원 : 0 엮인글 : 0 첨부파일 : 0 전체 페이지뷰 : 11,257,451 오늘 페이지뷰 : 269 어제 페이지뷰 : 551
Copyright by Myceo 2008 All rights reserved
수원시 팔달구 인계동 1017-3 2층
☏1600-0324

Made By Myceo

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소