Skip to content

Commit

Permalink
Extract signer roles
Browse files Browse the repository at this point in the history
  • Loading branch information
cavalle committed Dec 21, 2023
1 parent 15754a7 commit b557fcc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func main() {
}
// Using XAdES FacturaE example policy config
xades := &xmldsig.XAdESConfig{
Role: xmldsig.XAdESThirdParty,
Role: xmldsig.XAdESSignerRole("third party"),
Description: "test",
Policy: &xmldsig.XAdESPolicyConfig{
URL: "http://www.facturae.es/politica_de_firma_formato_facturae/politica_de_firma_formato_facturae_v3_1.pdf",
Expand Down
2 changes: 1 addition & 1 deletion signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestSignature(t *testing.T) {

func xadesConfig() *xmldsig.XAdESConfig {
return &xmldsig.XAdESConfig{
Role: xmldsig.XAdESThirdParty,
Role: xmldsig.XAdESSignerRole("third party"),
Description: "test",
Policy: &xmldsig.XAdESPolicyConfig{
URL: "http://www.facturae.es/politica_de_firma_formato_facturae/politica_de_firma_formato_facturae_v3_1.pdf",
Expand Down
7 changes: 0 additions & 7 deletions xmldsig.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ type options struct {
// XAdESSignerRole defines the accepted signer roles
type XAdESSignerRole string

// Pre-defined XAdES Signer Roles
const (
XAdESSupplier XAdESSignerRole = "supplier"
XAdESCustomer XAdESSignerRole = "customer"
XAdESThirdParty XAdESSignerRole = "third party"
)

// XAdESConfig defines what is expected for the configuration.
type XAdESConfig struct {
Role XAdESSignerRole `json:"role"`
Expand Down

0 comments on commit b557fcc

Please sign in to comment.