blob: 0ac05d1c036e129c86f12a50c9abbdb391b7687d [file] [log] [blame]
* Copyright (c) 2000-2019 Ericsson AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* Contributors:
* Gabor Szalai - initial implementation and initial documentation
// File: TS29510_NRF_OAuth2_v15.ttcn
// Description: Type definitions for 3GPP TS29510
module TS29510_NRF_OAuth2_v15 {
import from TS29571_CommonData all
import from TS29510_Nnrf_NFManagement all
external function f_enc_AccessTokenRsp(in AccessTokenRsp pdu) return octetstring
with { extension "prototype(convert) encode(JSON)" }
external function f_dec_AccessTokenRsp(in octetstring stream, out AccessTokenRsp pdu) return integer
with { extension "prototype(backtrack) decode(JSON)" }
external function f_enc_AccessTokenErr(in AccessTokenErr pdu) return octetstring
with { extension "prototype(convert) encode(JSON)" }
external function f_dec_AccessTokenErr(in octetstring stream, out AccessTokenErr pdu) return integer
with { extension "prototype(backtrack) decode(JSON)" }
type set AccessTokenReq {
enumerated { client_credentials} grant_type,
TS29571_CommonData.NfInstanceId nfInstanceId,
TS29510_Nnrf_NFManagement.NFType nfType,
TS29510_Nnrf_NFManagement.NFType targetNfType,
charstring scope // (pattern "^([a-zA-Z0-9_]*[*]{0,1})$")
type set AccessTokenRsp {
charstring access_token,
charstring token_type,
integer expires_in optional,
charstring scope optional // (pattern "^([a-zA-Z0-9_]*[*]{0,1})$")
type set AccessTokenClaims {
TS29571_CommonData.NfInstanceId issuer,
charstring subject,
set of TS29571_CommonData.NfInstanceId audience,
charstring scope, // (pattern "^([a-zA-Z0-9_]*[*]{0,1})$"),
integer expiration
type set AccessTokenErr {
enumerated { invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, invalid_sope} error_,
charstring error_description optional,
charstring error_uri optional
} with {
variant (error_) "name as 'error'"
} with {
encode "JSON"