Skip to content

Instantly share code, notes, and snippets.

View ljlm0402's full-sized avatar

아구몬 ljlm0402

View GitHub Profile
@ljlm0402
ljlm0402 / README.md
Created October 6, 2022 01:26 — forked from lcrilly/README.md
NGINX OAuth 2.0 Token Introspection

OAuth 2.0 Token Introspection with NGINX and njs

This configuration enables NGINX to validate an authentication token against an authorization server by using OAuth 2.0 Token Introspection (RFC 7662). This solution uses the auth_request module and the NGINX JavaScript module to require authentication and perform the token introspection request.

By default, the client's authentication token is expected as a bearer token supplied in the Authorization header. If supplied elsewhere in the HTTP request, the $access_token variable must be configured to specify where to obtain the token.

Token introspection requests are authenticated. By default, the $oauth_client_id and $oauth_client_secret variables are used to perform HTTP Basic authentication with the Authorization Server. If only the $oauth_client_secret variable is specified then that value is used

@ljlm0402
ljlm0402 / auth_request.conf
Created October 6, 2022 01:19 — forked from nginx-gists/auth_request.conf
Validating OAuth 2.0 Access Tokens with NGINX and NGINX Plus
server {
listen 80;
location / {
auth_request /_oauth2_token_introspection;
proxy_pass http://my_backend;
}
location = /_oauth2_token_introspection {
internal;
@ljlm0402
ljlm0402 / Commit Convention.md
Last active September 28, 2022 13:11
개발 룰 & 컨벤션
# <타입>: [FE/BE]<제목>

##### 제목은 최대 50 글자까지만 입력 ############## -> |


# 본문은 위에 작성
######## 본문은 한 줄에 최대 72 글자까지만 입력 ########################### -> |
- 본문 내용

소개

이 글은 Oauth를 이용해서 access token을 획득한 후에 api에 접속하는 방법에 대해서 설명하고 있습니다.

우선 공부해야 할 것들

이 글은 WEB2 OAuth2 수업과 WEB2 HTTP 수업에 의존하고 있습니다. OAuth와 HTTP를 잘 모르신다면 이 수업들을 먼저 보시고 이 글을 볼 것을 권해드립니다.

Bearer Authentication란?

API에 접속하기 위해서는 access token을 API 서버에 제출해서 인증을 해야 합니다. 이 때 사용하는 인증 방법이 Bearer Authentication 입니다. 이 방법은 OAuth를 위해서 고안된 방법이고, RFC 6750에 표준명세서가 있습니다.

@ljlm0402
ljlm0402 / emoji.md
Created November 27, 2020 03:30
깃허브 마크다운 Emoji 모음
Emoji Uni Code
":capricorn:": "\U00002651"
":end:": "\U0001f51a"
":no_mobile_phones:": "\U0001f4f5"
":couple:": "\U0001f46b"
":snowman:": "\U000026c4"
":sunrise_over_mountains:": "\U0001f304"
":suspension_railway:": "\U0001f69f"
":arrows_counterclockwise:": "\U0001f504"
@ljlm0402
ljlm0402 / README.md
Created November 27, 2020 01:27
GitHub Label, Issue, Pull request Settings

Github Label 세팅

Label 이란?

  • Issue, PR 에 붙여서 분류하기 위한 이름표

Github 액세스 토큰 발급

https://github.com/settings/tokens

  • Generate new token 클릭
  • 원하는 이름 입력
  • scopes에서 repo 선택
@ljlm0402
ljlm0402 / README.md
Last active November 27, 2020 01:27
SPA

Single Page Application

SPA에 대해 다루기 전 먼저 CSR과 SSR에 대해 알아보자

  • Client side rendering vs Server side rendering

    이슈\렌더링 방식 CSR SSR (~= 전통적인 웹 방식)
    초기 view 로딩 속도 느림 빠름
    *SEO 상대적으로 불리 상대적으로 유리
    performance 서버 트래픽 감소, (필요한) 부분적 로딩 서버 트래픽 증가, 중복 로딩

| UX | 부분적 로딩으로 화면 깜빡임이 없음 | 페이지 이동 시 화면 깜빡임

@ljlm0402
ljlm0402 / git-flow.md
Last active March 12, 2024 10:29
배포전략

image


image


image

@ljlm0402
ljlm0402 / tsconfig.md
Last active January 8, 2024 01:46
tsconfig 정리

간단 정리

{
  "compilerOptions": {
    "target": "ES2017", // 사용할 ECMAScript 버전 설정

    /////////// module ///////////
    "module": "CommonJS", // 모듈 설정
    "moduleResolution": "node", // 모듈 (검색)해석 방식 설정
@ljlm0402
ljlm0402 / README.md
Last active February 11, 2020 13:11
nginx 관련 Gist

Nginx

개요

  • Event-Driven 방식으로 클라 요청 처리하는 웹 서버
  • 이벤트 기반이라서 apache보다 좋은 성능 가짐

쓰임새

  • 리버스 프록싱
    • 외부에서 내부 서버 알 수 없으므로 보안 굿
    • 로드 밸런싱