Skip to content

Commit

Permalink
BLO-23 | update callback revocation status time
Browse files Browse the repository at this point in the history
  • Loading branch information
edutomesco committed Sep 17, 2024
1 parent 02f29a3 commit d712764
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ issuer:
key:
key: ""

verifier:
did:

verification:
expiration: ""
5 changes: 5 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ type IssuerConfig struct {
IssuerDid string `mapstructure:"issuer_did"`
}

type VerifierConfig struct {
Did string `mapstructure:"did" default:"did:polygonid:polygon:amoy:2qbSDKkr7smskYx9Ds9PkU4ARHbwXnFsSpcfsPHo7R"`
}

type KeyConfig struct {
Key string `mapstructure:"key"`
}
Expand All @@ -64,6 +68,7 @@ type Config struct {
Blockchain BlockchainConfig
Issuer IssuerConfig
Verification VerificationConfig
Verifier VerifierConfig
}

var Configuration = Config{}
Expand Down
2 changes: 1 addition & 1 deletion internal/platform/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"bloock-identity-managed-api/internal/platform/server/middleware"
"bloock-identity-managed-api/internal/platform/utils"
"fmt"
"github.com/gin-contrib/cors"
"github.com/gin-contrib/logger"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog"
"github.com/gin-contrib/cors"
)

type Server struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/platform/zkp/verification_zkp_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (z VerificationZkpRepository) DecodeJWZ(ctx context.Context, token string)
}

func (z VerificationZkpRepository) VerifyJWZ(ctx context.Context, token string, request protocol.AuthorizationRequestMessage) error {
_, err := z.authVerifier.FullVerify(ctx, token, request, pubsignals.WithAcceptedStateTransitionDelay(5*time.Second))
_, err := z.authVerifier.FullVerify(ctx, token, request, pubsignals.WithAcceptedStateTransitionDelay(5*time.Minute))
if err != nil {
z.logger.Error().Err(err).Msg("")
return err
Expand Down
4 changes: 3 additions & 1 deletion internal/services/criteria/verification_by_schema_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
type CreateVerification struct {
identityRepository repository.IdentityRepository
publicUrl string
verifierDid string
verificationSyncMap *utils.SyncMap
authSyncMap *utils.SyncMap
logger zerolog.Logger
Expand All @@ -29,6 +30,7 @@ func NewCreateVerification(ctx context.Context, verificationSyncMap, authSyncMap
return &CreateVerification{
identityRepository: identity.NewIdentityRepository(ctx, l),
publicUrl: config.Configuration.Api.PublicHost,
verifierDid: config.Configuration.Verifier.Did,
verificationSyncMap: verificationSyncMap,
authSyncMap: authSyncMap,
logger: l,
Expand Down Expand Up @@ -61,7 +63,7 @@ func (c CreateVerification) Create(ctx context.Context, verificationJSON []byte)
return nil, err
}

request := auth.CreateAuthorizationRequest("verification request", "did:polygonid:polygon:amoy:2qbSDKkr7smskYx9Ds9PkU4ARHbwXnFsSpcfsPHo7R", callbackUrl)
request := auth.CreateAuthorizationRequest("verification request", c.verifierDid, callbackUrl)

randomUUID := uuid.New().String()
request.ID = randomUUID
Expand Down

0 comments on commit d712764

Please sign in to comment.