mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 09:08:45 +05:00
Added support for *stir_initiate
This commit is contained in:
committed by
Dan Christian Bogos
parent
0fadf12a51
commit
3e8d18281f
@@ -669,7 +669,8 @@ const (
|
||||
MetaRelease = "*release"
|
||||
MetaAllocate = "*allocate"
|
||||
MetaAuthorize = "*authorize"
|
||||
MetaSTIRAuthorize = "*stir_authorize"
|
||||
MetaSTIRAuthenticate = "*stir_authenticate"
|
||||
MetaSTIRInitiate = "*stir_initiate"
|
||||
MetaInit = "*init"
|
||||
MetaRatingPlanCost = "*rating_plan_cost"
|
||||
RatingPlanIDs = "RatingPlanIDs"
|
||||
@@ -1985,6 +1986,8 @@ const (
|
||||
STIROriginatorURI = "STIROriginatorURI"
|
||||
STIRDestinationTn = "STIRDestinationTn"
|
||||
STIRDestinationURI = "STIRDestinationURI"
|
||||
STIRPublicKeyPath = "STIRPublicKeyPath"
|
||||
STIRPrivateKeyPath = "STIRPrivateKeyPath"
|
||||
|
||||
STIRExtraInfoPrefix = ";info=<"
|
||||
STIRExtraInfoSuffix = ">;alg=ES256;ppt=shaken"
|
||||
|
||||
@@ -264,5 +264,5 @@ func ErrNotConvertibleTF(from, to string) error {
|
||||
|
||||
// NewSTIRError returns a error with a *stir_authorize prefix
|
||||
func NewSTIRError(reason string) error {
|
||||
return fmt.Errorf("%s: %s", MetaSTIRAuthorize, reason)
|
||||
return fmt.Errorf("%s: %s", MetaSTIRAuthenticate, reason)
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ func TestNewErrChargerS(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewSTIRError(t *testing.T) {
|
||||
expected := `*stir_authorize: wrong header`
|
||||
expected := `*stir_authenticate: wrong header`
|
||||
if rcv := NewSTIRError("wrong header"); rcv.Error() != expected {
|
||||
t.Errorf("Expecting: %q, received: %q", expected, rcv.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user