요즘들어 "~로 로그인하기" 가 많아지고 있다. 페이스북이나 구글이 대표적이고, 한국에서는 네이버도 많이 사용하며 개발자 관련 웹에서는 깃허브도 껴있는 경우가 많다. 이런 식의 다른 서비스를 통해 인증하는 방식을, OAuth 인증 방식이라고 하는 모양이다. 내가 회사 업무를 위해 사용하는 몇몇 소프트웨어도 이러한 인증을 지원하는 경우가 많다. 이 글에서는 그러한 인증을 구현하지는게 아니라 그러한 인증을 사용해 보자는 것에 목적을 둔다. 어떤 방식으로 인증하는지를 직접 사용해보고 OAuth방식 인증의 절차를 알아보는 기회도 될것이다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This mock will make sure that we are able to access mapStateToProps, mapDispatchToProps and reactComponent in the test file. | |
| // To use this, just do `jest.mock('react-redux');` in your page.test.js file. | |
| const mockDispatch = jest.fn((action) => action); | |
| module.exports = { | |
| connect: (mapStateToProps, mapDispatchToProps) => (reactComponent) => ({ | |
| mapStateToProps, | |
| mapDispatchToProps: (dispatch = mockDispatch, ownProps) => mapDispatchToProps(dispatch, ownProps), | |
| reactComponent, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################## | |
| ### config.yml ### | |
| ################## | |
| version: 2 | |
| jobs: | |
| build: | |
| docker: | |
| - image: circleci/python:3.6 | |
| steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // You can use maven-publish-helper.gradle script without changes and even share it between multiple | |
| // modules. Just place the maven-publish-helper.gradle file in the root directory of your project, | |
| // then apply it at the bottom of your module's build.gradle file like this: | |
| // ...content of module's build.gradle file... | |
| apply from: '../maven-publish-helper.gradle' | |
| publishing { | |
| publications { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Authorize to GitHub to get the latest release tar.gz | |
| # Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/ | |
| # Requires: jq package to parse json | |
| # Your oauth token goes here, see link above | |
| OAUTH_TOKEN="34k234lk234lk2j3lk4j2l3k4j2kj3lk" | |
| # Repo owner (user id) | |
| OWNER="your-user-name" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| /** | |
| * @website http://albulescu.ro | |
| * @author Cosmin Albulescu <cosmin@albulescu.ro> | |
| */ | |
| import ( | |
| "bytes" | |
| "fmt" |
| HEADER | EMPHASIS | HORIZONTAL_LINE | LIST | TABLE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # gh-dl-release! It works! | |
| # | |
| # This script downloads an asset from latest or specific Github release of a | |
| # private repo. Feel free to extract more of the variables into command line | |
| # parameters. | |
| # | |
| # PREREQUISITES | |
| # |
NewerOlder

