• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openwallet-foundation / acapy-vc-authn-oidc / 16351195883

17 Jul 2025 04:56PM UTC coverage: 81.866% (-6.0%) from 87.841%
16351195883

Pull #802

github

web-flow
Merge ebc1ae3d5 into b68e6aa9a
Pull Request #802: Connection based verification

155 of 221 new or added lines in 7 files covered. (70.14%)

6 existing lines in 1 file now uncovered.

939 of 1147 relevant lines covered (81.87%)

0.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.09
/oidc-controller/api/core/models.py
1
from datetime import datetime, UTC
1✔
2
from typing import TypedDict
1✔
3

4
from bson import ObjectId
1✔
5
from pydantic import BaseModel, ConfigDict, Field, field_serializer
1✔
6
from pyop.userinfo import Userinfo
1✔
7
from pydantic_core import core_schema
1✔
8

9

10
class PyObjectId(ObjectId):
1✔
11
    @classmethod
1✔
12
    def __get_pydantic_core_schema__(
1✔
13
        cls, source_type, handler
14
    ) -> core_schema.CoreSchema:
15
        return core_schema.with_info_plain_validator_function(cls.validate)
1✔
16

17
    @classmethod
1✔
18
    def validate(cls, v, info):
1✔
19
        if not ObjectId.is_valid(v):
×
20
            raise ValueError("Invalid objectid")
×
21
        return ObjectId(v)
×
22

23
    @classmethod
1✔
24
    def __get_pydantic_json_schema__(cls, field_schema):
1✔
25
        field_schema.update(type="string")
×
26

27

28
class HealthCheck(BaseModel):
1✔
29
    name: str
1✔
30
    version: str
1✔
31
    description: str
1✔
32

33

34
class StatusMessage(BaseModel):
1✔
35
    status: bool
1✔
36
    message: str
1✔
37

38

39
class UUIDModel(BaseModel):
1✔
40
    id: PyObjectId = Field(default_factory=PyObjectId, alias="_id")
1✔
41

42
    model_config = ConfigDict()
1✔
43

44
    @field_serializer("id")
1✔
45
    def serialize_id(self, value: PyObjectId) -> str:
1✔
NEW
46
        return str(value)
×
47

48

49
class TimestampModel(BaseModel):
1✔
50
    created_at: datetime = Field(default_factory=lambda: datetime.now(UTC))
1✔
51
    updated_at: datetime = Field(default_factory=lambda: datetime.now(UTC))
1✔
52

53

54
class GenericErrorMessage(BaseModel):
1✔
55
    detail: str
1✔
56

57

58
# Currently used as a TypedDict since it can be used as a part of a
59
# Pydantic class but a Pydantic class can not inherit from TypedDict
60
# and and BaseModel
61
class RevealedAttribute(TypedDict, total=False):
1✔
62
    sub_proof_index: int
1✔
63
    values: dict
1✔
64

65

66
class VCUserinfo(Userinfo):
1✔
67
    """
68
    User database for VC-based Identity provider: since no users are
69
    known ahead of time, a new user is created with
70
    every authentication request.
71
    """
72

73
    def __getitem__(self, item):
1✔
74
        """
75
        There is no user info database, we always return an empty dictionary
76
        """
77
        return {}
×
78

79
    def get_claims_for(self, user_id, requested_claims, userinfo=None):
1✔
80
        # type: (str, Mapping[str, Optional[Mapping[str, Union[str, List[str]]]])
81
        # -> Dict[str, Union[str, List[str]]]
82
        """
83
        There is no user info database, we always return an empty dictionary
84
        """
85
        return {}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc