Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusBadRequest = "StatusBadRequest" StatusInvalidToken = "StatusInvalidToken" StatusSuccess = "StatusSuccess" StatusConfigErr = "StatusConfigErr" )
Error results of token verification
Variables ¶
This section is empty.
Functions ¶
func GetAccessToken ¶
GetAccessToken Get the access token to access NEF NF component. This API can
be ported to operator provided token access mechanism
i/p : None o/p token : The access token
err : error code in case of failure or nil in success
func GetNEFAccessTokenFromNRF ¶
func GetNEFAccessTokenFromNRF(accessTokenReq AccessTokenReq) ( NefAccessToken string, err error)
GetNEFAccessTokenFromNRF Generates the token. This is the functionality of NRF component of 5GC
Types ¶
type AccessTokenClaims ¶
type AccessTokenClaims struct { Issuer string `json:"issuer"` Subject string `json:"subject"` Audience interface{} `json:"audience"` Scope string `json:"scope"` Expiration int64 `json:"expiration"` jwt.StandardClaims }
AccessTokenClaims struct
type AccessTokenReq ¶
type AccessTokenReq struct { GrantType string `json:"grant_type"` NfInstanceID string `json:"nfInstanceId"` NfType NfType `json:"nfType,omitempty"` TargetNfType NfType `json:"targetNfType,omitempty"` Scope string `json:"scope"` TargetNfInstanceID string `json:"targetNfInstanceId,omitempty"` RequesterPlmn *PlmnID `json:"requesterPlmn,omitempty"` TargetPlmn *PlmnID `json:"targetPlmn,omitempty"` }
AccessTokenReq NRF access token request
type PlmnID ¶
type PlmnID struct { Mcc string `json:"mcc" yaml:"mcc" bson:"mcc" mapstructure:"Mcc"` Mnc string `json:"mnc" yaml:"mnc" bson:"mnc" mapstructure:"Mnc"` }
PlmnID PLMN ID struct
type TokenVerificationResult ¶
type TokenVerificationResult string
TokenVerificationResult Result of the token verification
func ValidateAccessToken ¶
func ValidateAccessToken(reqToken string) (status TokenVerificationResult, err error)
ValidateAccessToken Validate the access token i/p reqToken : token to be validated o/p status : Success/Failure result of the operation
err : error info of the token validation process.
Click to show internal directories.
Click to hide internal directories.