100% 브라우저 메모리 연산 • 서버 로그 수집 제로 • 즉각적인 실행
Curious Techie개발자 툴박스
Security & AuthenticationIETF RFC 6749 / RFC 7636 (PKCE) / OpenID Foundation✓ 빠른 조회 매트릭스 표 (6 개 항목) • KO

OAuth 2.0 및 OpenID Connect 핵심 개념 레퍼런스

RFC 6749 표준: 인가 코드(Authorization Code), PKCE, 토큰 체계 일람

CT
Curious-Techie Engineering Team검증된 작성자

Web Protocols & Security Architecture Research

발행일:
•
수정일:
•7 min read
공식 기술 규격:RFC 9110(IETF)
검토자: Curious-Techie Architecture Peer Review Group

개요 및 범위

RFC 6749 및 RFC 7636(PKCE) 표준은 브라우저 SPA 및 모바일 환경에서 위조 불가능한 권한 위임 체계를 구현합니다.

표준 규격표 및 매트릭스

키워드, 상태 코드 또는 지시문 이름으로 실시간 검색

키 / 코드정의 및 세부사항GEO 시맨틱 계층표준 규격 및 참고
Resource Owner
Resource Owner

An entity capable of granting access to a protected resource (typically the human end-user).

The human user logging into their account.
●Resource Owner
↳OAuth role
↳identity principal
↳end-user authorization authority
RFC 6749 §1.1

Owns the data stored on the Resource Server.

Resource Server
Resource Server

The server hosting protected resources, capable of accepting and responding to protected resource requests using access tokens.

https://api.example.com/v1/photos
●Resource Server
↳OAuth role
↳API backend
↳protected endpoint host
RFC 6749 §1.1

Validates access tokens before returning user data.

Authorization Server
Authorization Server

The server issuing access tokens to the client after successfully authenticating the resource owner and obtaining authorization.

https://accounts.google.com or Auth0
●Authorization Server
↳OAuth role
↳identity provider
↳token issuing authority
RFC 6749 §1.1

Presents the login consent screen to the user.

Authorization Code with PKCE
Authorization Code with PKCE

The gold-standard OAuth grant type for SPAs, mobile apps, and servers, preventing code interception attacks.

code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=S256
●PKCE
↳OAuth grant
↳authorization code flow
↳cryptographic proof-of-possession code exchange
RFC 7636

Mandatory for public clients (React, iOS, Android) that cannot securely hold client secrets.

Client Credentials
Client Credentials Grant

Grant type used for machine-to-machine (M2M) communication where the client is the resource owner.

grant_type=client_credentials&client_id=...&client_secret=...
●Client Credentials
↳OAuth grant
↳M2M authorization
↳backend service-to-service auth
RFC 6749 §4.4

No human user is involved; used by background microservices, daemons, and cron jobs.

Refresh Token
Refresh Token

A credential used to obtain a new access token when the current access token expires without user interaction.

grant_type=refresh_token&refresh_token=rT_8941a...
●Refresh Token
↳OAuth credential
↳token rotation
↳long-lived renewal credential
RFC 6749 §1.5

Long-lived; should be stored in secure HttpOnly cookies and rotated on every use.

기술 예제 및 실행 코드

PKCE Code Verifier & Challenge Generation (JavaScript)

javascript코드 복사
// 1. Generate random code_verifier string (43-128 chars)
const array = new Uint8Array(32);
crypto.getRandomValues(array);
const codeVerifier = btoa(String.fromCharCode(...array))
  .replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');

// 2. Compute SHA-256 digest of code_verifier
const encoder = new TextEncoder();
const data = encoder.encode(codeVerifier);
const digest = await crypto.subtle.digest('SHA-256', data);

// 3. Base64URL encode digest to create code_challenge
const codeChallenge = btoa(String.fromCharCode(...new Uint8Array(digest)))
  .replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');

PKCE binds the authorization request to the token request, preventing malicious apps from intercepting authorization codes.

자주 묻는 질문 (FAQ)

표준 규격 Q&A

What is the difference between OAuth 2.0 and OpenID Connect (OIDC)?↓
OAuth 2.0 is designed for AUTHORIZATION (granting access to APIs via Access Tokens). OpenID Connect adds an identity layer on top of OAuth 2.0 for AUTHENTICATION (proving who the user is via ID Tokens).
Authoritative Sourcing & Verification

References & Primary Sources

Every source below directly substantiates technical statements and protocol behaviors explained in OAuth 2.0 및 OpenID Connect 핵심 개념 레퍼런스. Curious-Techie prioritizes official Internet standards (IETF RFCs, W3C Recommendations, WHATWG specifications) and established security bodies (OWASP, NIST). Zero sponsored or secondary links.

  1. [1]IETFPrimary SpecificationRFC 6749 • Section 1 & 4
    Verified Primary Source
    Technical Claim Supported:

    Specifies delegated authorization protocol flows, client registration, token issuance endpoints, and scoped resource access tokens.

  2. [2]IETFPrimary SpecificationRFC 7636 • Section 4 & 5
    Verified Primary Source
    Technical Claim Supported:

    Mandatory standard preventing authorization code injection and interception attacks in public clients (SPAs and mobile apps) using SHA-256 code verifiers.

  3. [3]IETFAuthoritative Security StandardRFC 6819 • Section 3
    Verified Primary Source
    Technical Claim Supported:

    Analyzes attack surfaces including redirect URI manipulation, token leakage, and CSRF attacks on authorization flows.