Skip to content

rename DeserializeIdentity to IdentityResolver #54

@cendhu

Description

@cendhu

Rename the following interface and method

type IdentityDeserializer interface {
	// DeserializeIdentity deserializes an identity.
	// Deserialization will fail if the identity is associated to
	// an msp that is different from this one that is performing
	// the deserialization.
	DeserializeIdentity(identity *applicationpb.Identity) (Identity, error)

	// GetKnownDeserializedIdentity returns a known identity matching the given IdentityIdentifier.
	GetKnownDeserializedIdentity(IdentityIdentifier) Identity

	// IsWellFormed checks if the given identity can be deserialized into its provider-specific form
	IsWellFormed(identity *applicationpb.Identity) error
}

to


type IdentityResolver interface {
    // Resolve converts a proto identity into a usable domain Identity.
    // It returns an error if the identity belongs to a different MSP.
    Resolve(id *applicationpb.Identity) (Identity, error)

    // Lookup returns a known identity matching the given identifier.
    Lookup(id IdentityIdentifier) Identity

   // Validate checks if the given identity is well-formed and valid for this provider.
    Validate(id *applicationpb.Identity) error
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions