github.com/hxx258456/fabric-ca-gm@v0.0.3-0.20221111064038-a268ad7e3a37/internal/pkg/api/serverresponses.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package api
     8  
     9  const (
    10  	// IdemixTokenVersion1 represents version 1 of the authorization token created using Idemix credential
    11  	IdemixTokenVersion1 = "1"
    12  )
    13  
    14  // CAInfoResponseNet is the response to the GET /info request
    15  type CAInfoResponseNet struct {
    16  	// CAName is a unique name associated with fabric-ca-server's CA
    17  	CAName string
    18  	// Base64 encoding of PEM-encoded certificate chain
    19  	CAChain string
    20  	// Base64 encoding of Idemix issuer public key
    21  	IssuerPublicKey string
    22  	// Base64 encoding of PEM-encoded Idemix issuer revocation public key
    23  	IssuerRevocationPublicKey string
    24  	// Version of the server
    25  	Version string
    26  }
    27  
    28  // EnrollmentResponseNet is the response to the /enroll request
    29  type EnrollmentResponseNet struct {
    30  	// Base64 encoded PEM-encoded ECert
    31  	Cert string
    32  	// The server information
    33  	ServerInfo CAInfoResponseNet
    34  }
    35  
    36  // IdemixEnrollmentResponseNet is the response to the /idemix/credential request
    37  type IdemixEnrollmentResponseNet struct {
    38  	// Base64 encoding of proto bytes of idemix.Credential
    39  	Credential string
    40  	// Attribute name-value pairs
    41  	Attrs map[string]interface{}
    42  	// Base64 encoding of proto bytes of idemix.CredentialRevocationInformation
    43  	CRI string
    44  	// Base64 encoding of the issuer nonce
    45  	Nonce string
    46  	// The CA information
    47  	CAInfo CAInfoResponseNet
    48  }