logo

Client credentials 인증

사용자의 인증없이 앱이 직접적으로 리소스에 접근할 수 있습니다. - 현재 제공되는 API 없음.
client credentials 인증은 앱 등록 요청시 요청하셔야합니다.

POST localhost:8083/oauth/token
Authorization: Basic MGYxOWYxNG==
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&scope=profile.info
파라메타 필수여부 설명
Authorization Header 필수 Basic token 입니다. Basic token 생성을 참고하세요.
Content-Type Header 필수 POST의 content type 설정 : application/x-www-form-urlencoded 고정
grant_type 필수 client_credentials 고정
scope 필수 사용자 동의가 필요한 리소스의 범위입니다. 공백으로 구분할 수 있습니다.
성공 응답
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
{
    "access_token": "2a324609ec94f18d614d4bc425de754",
    "token_type": "bearer",
    "expires_in": 43199,
    "scope": "profile.info"
}
파라메타 설명
access_token 액세스 토큰입니다. 앱은 이 토큰을 사용하여 웹 API에 인증할 수 있습니다.
token_type 토큰 유형 값입니다. 모든 API에서 bearer형식만 지원합니다.
expires_in access_token의 유효 기간(초) 입니다.
scope access_token을 이용해 리소스를 요청할 때 사용되는 리소스의 범위입니다. 자세한 scope의 범위는 Scopes 문서를 참조하세요.

Client credentials 인증은 refresh_token이 발급되지 않습니다.

샘플 - Access Token 요청