Nnrf_AccessToken

The NRF offers an Nnrf_AccessToken service (used for OAuth2 authorization, see IETF RFC 6749 [16]), following the "Client Credentials" authorization grant, as specified in 3GPP TS 33.501 [15]. It exposes a "Token Endpoint" where the Access Token Request service can be requested by NF Service Consumers.

Reference: 3GPP TS 33.501 [15]

OpenAPI

OpenAPI Version: 3.0.0

info

Version: '1.0.0'

Title: 'NRF OAuth2'

Description: 'NRF OAuth2 Authorization'

externalDocs

Description: 3GPP TS 29.510 V15.2.0; 5G System; Network Function Repository Services; Stage 3

URL: 'http://www.3gpp.org/ftp/Specs/archive/29_series/29.510/'

paths

/oauth2/token

Method: Post

Summary: Access Token Request

Operation ID: AccessTokenRequest

Tags:

- Access Token Request

Request Body:

Content:

application/x-www-form-urlencoded:

Schema:

Reference: '#/components/schemas/AccessTokenReq'

Required/Optional: true

Responses:

'200' Successful Access Token Request

Content:

Application/JSON:

Schema:

Reference: '#/components/schemas/AccessTokenRsp'

Headers:

Cache-Control:

Reference: '#/components/headers/cache-control'

Pragma:

Reference: '#/components/headers/pragma'

'400' Error in the Access Token Request

Content:

Application/JSON:

Schema:

Reference: '#/components/schemas/AccessTokenErr'

Headers:

Cache-Control:

Reference: '#/components/headers/cache-control'

Pragma:

Reference: '#/components/headers/pragma'

components

headers

cache-control

Required: true

schema:

Type: string

enum:

- no-store

pragma

Required: true

schema:

Type: string

enum:

- no-cache

schemas

AccessTokenReq

Type: object

Required:

- grant_type

- nfInstanceId

- scope

Properties:

grant_type:

Type: string

enum:

- client_credentials

nfInstanceId:

Reference: 'TS29571_CommonData.yaml#/components/schemas/NfInstanceId'

nfType:

Reference: 'TS29510_Nnrf_NFManagement.yaml#/components/schemas/NFType'

targetNfType:

Reference: 'TS29510_Nnrf_NFManagement.yaml#/components/schemas/NFType'

scope:

Type: string

Pattern: '^([a-zA-Z0-9_-]+)( [a-zA-Z0-9_-]+)*$'

targetNfInstanceId:

Reference: 'TS29571_CommonData.yaml#/components/schemas/NfInstanceId'

requesterPlmn:

Reference: 'TS29571_CommonData.yaml#/components/schemas/PlmnId'

targetPlmn:

Reference: 'TS29571_CommonData.yaml#/components/schemas/PlmnId'

AccessTokenRsp

Type: object

Required:

- access_token

- token_type

Properties:

access_token:

Type: string

Description: JWS Compact Serialized representation of JWS signed JSON object (AccessTokenClaims)

token_type:

Type: string

expires_in:

Type: integer

scope:

Type: string

Pattern: '^([a-zA-Z0-9_-]+)( [a-zA-Z0-9_-]+)*$'

AccessTokenClaims

Type: object

Required:

- issuer

- subject

- audience

- scope

- expiration

Properties:

issuer:

Reference: 'TS29571_CommonData.yaml#/components/schemas/NfInstanceId'

subject:

Type: string

audience:

anyOf:

- $ref: 'TS29510_Nnrf_NFManagement.yaml#/components/schemas/NFType'

- type: array

Items:

Reference: 'TS29571_CommonData.yaml#/components/schemas/NfInstanceId'

minItems: 1

scope:

Type: string

Pattern: '^([a-zA-Z0-9_-]+)( [a-zA-Z0-9_-]+)*$'

expiration:

Type: integer

AccessTokenErr

Type: object

Required:

- error

Properties:

error:

Type: string

enum:

- invalid_request

- invalid_client

- invalid_grant

- unauthorized_client

- unsupported_grant_type

- invalid_scope

error_description:

Type: string

error_uri:

Type: string