change uri prefix to impp:wireapp=

pull/1671/head
beltram 1 year ago committed by Herman Slatman
parent cc5fd0a6a5
commit 01ef526d08
No known key found for this signature in database
GPG Key ID: F4D8A44EA0A75A4F

@ -199,7 +199,7 @@ func TestIMIntegration(t *testing.T) {
Identifiers: []acme.Identifier{
{
Type: "wireapp-id",
Value: `{"name": "Smith, Alice M (QA)", "domain": "example.com", "client-id": "wireapp-id:75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "wireapp:alice.smith.qa@example.com"}`,
Value: `{"name": "Smith, Alice M (QA)", "domain": "example.com", "client-id": "impp:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "impp:wireapp=alice.smith.qa@example.com"}`,
},
},
}
@ -377,12 +377,12 @@ func TestIMIntegration(t *testing.T) {
},
})
qUserID, err := url.Parse("wireapp-id:75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com")
qUserID, err := url.Parse("impp:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com")
if err != nil {
t.Fatal("parse user ID URI", err)
}
_ = qUserID
qUserName, err := url.Parse("wireapp:alice.smith.qa@example.com")
qUserName, err := url.Parse("impp:wireapp=alice.smith.qa@example.com")
if err != nil {
t.Fatal("parse user name URI", err)
}

@ -54,7 +54,7 @@ func (n *NewOrderRequest) Validate() error {
if err != nil {
return acme.NewError(acme.ErrorMalformedType, "ID cannot be parsed")
}
if !strings.HasPrefix(orderValue.ClientID, "wireapp-id:") {
if !strings.HasPrefix(orderValue.ClientID, "impp:wireapp=") {
return acme.NewError(acme.ErrorMalformedType, "missing client ID prefix")
}
default:

@ -190,7 +190,7 @@ func TestNewOrderRequest_Validate(t *testing.T) {
return test{
nor: &NewOrderRequest{
Identifiers: []acme.Identifier{
{Type: "wireapp-id", Value: `{"name": "Smith, Alice M (QA)", "domain": "example.com", "client-id": "wireapp-id:75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "wireapp:alice.smith.qa@example.com"}`},
{Type: "wireapp-id", Value: `{"name": "Smith, Alice M (QA)", "domain": "example.com", "client-id": "impp:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "impp:wireapp=alice.smith.qa@example.com"}`},
},
NotAfter: naf,
NotBefore: nbf,
@ -785,7 +785,7 @@ func TestHandler_newAuthorization(t *testing.T) {
AccountID: "accID",
Identifier: acme.Identifier{
Type: "wireapp",
Value: "wireapp-id:user/client@domain",
Value: "impp:wireapp=user/client@domain",
},
Status: acme.StatusPending,
ExpiresAt: clock.Now(),
@ -1699,7 +1699,7 @@ func TestHandler_NewOrder(t *testing.T) {
acc := &acme.Account{ID: "accID"}
nor := &NewOrderRequest{
Identifiers: []acme.Identifier{
{Type: "wireapp-id", Value: `{"client-id": "wireapp-id:user/client@domain"}`},
{Type: "wireapp-id", Value: `{"client-id": "impp:wireapp=user/client@domain"}`},
},
}
b, err := json.Marshal(nor)
@ -1736,7 +1736,7 @@ func TestHandler_NewOrder(t *testing.T) {
assert.Equals(t, ch.AccountID, "accID")
assert.NotEquals(t, ch.Token, "")
assert.Equals(t, ch.Status, acme.StatusPending)
assert.Equals(t, ch.Value, `{"client-id": "wireapp-id:user/client@domain"}`)
assert.Equals(t, ch.Value, `{"client-id": "impp:wireapp=user/client@domain"}`)
return nil
},
MockCreateAuthorization: func(ctx context.Context, az *acme.Authorization) error {

Loading…
Cancel
Save