mirror of
https://github.com/smallstep/certificates.git
synced 2024-11-11 07:11:00 +00:00
feat: change from impp prefix to just im
This commit is contained in:
parent
b6ec4422b4
commit
3f474f77d4
@ -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": "impp:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "impp:wireapp=alice.smith.qa@example.com"}`,
|
||||
Value: `{"name": "Smith, Alice M (QA)", "domain": "example.com", "client-id": "im:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "im:wireapp=alice.smith.qa@example.com"}`,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -377,12 +377,12 @@ func TestIMIntegration(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
qUserID, err := url.Parse("impp:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com")
|
||||
qUserID, err := url.Parse("im:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com")
|
||||
if err != nil {
|
||||
t.Fatal("parse user ID URI", err)
|
||||
}
|
||||
_ = qUserID
|
||||
qUserName, err := url.Parse("impp:wireapp=alice.smith.qa@example.com")
|
||||
qUserName, err := url.Parse("im: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, "impp:wireapp=") {
|
||||
if !strings.HasPrefix(orderValue.ClientID, "im: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": "impp:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "impp:wireapp=alice.smith.qa@example.com"}`},
|
||||
{Type: "wireapp-id", Value: `{"name": "Smith, Alice M (QA)", "domain": "example.com", "client-id": "im:wireapp=75d73550-16e0-4027-abfd-0137e32180cc/ed416ce8ecdd9fad@example.com", "handle": "im: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: "impp:wireapp=user/client@domain",
|
||||
Value: "im: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": "impp:wireapp=user/client@domain"}`},
|
||||
{Type: "wireapp-id", Value: `{"client-id": "im: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": "impp:wireapp=user/client@domain"}`)
|
||||
assert.Equals(t, ch.Value, `{"client-id": "im:wireapp=user/client@domain"}`)
|
||||
return nil
|
||||
},
|
||||
MockCreateAuthorization: func(ctx context.Context, az *acme.Authorization) error {
|
||||
|
Loading…
Reference in New Issue
Block a user