-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathservice_provider_config.py
More file actions
143 lines (107 loc) · 5.36 KB
/
service_provider_config.py
File metadata and controls
143 lines (107 loc) · 5.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
from enum import Enum
from typing import Annotated
from typing import Any
from typing import Optional
from pydantic import Field
from ..annotations import Mutability
from ..annotations import Required
from ..annotations import Returned
from ..annotations import Uniqueness
from ..attributes import ComplexAttribute
from ..reference import ExternalReference
from ..reference import Reference
from .resource import Resource
class Patch(ComplexAttribute):
supported: Annotated[Optional[bool], Mutability.read_only, Required.true] = None
"""A Boolean value specifying whether or not the operation is supported."""
class Bulk(ComplexAttribute):
supported: Annotated[Optional[bool], Mutability.read_only, Required.true] = None
"""A Boolean value specifying whether or not the operation is supported."""
max_operations: Annotated[Optional[int], Mutability.read_only, Required.true] = None
"""An integer value specifying the maximum number of operations."""
max_payload_size: Annotated[Optional[int], Mutability.read_only, Required.true] = (
None
)
"""An integer value specifying the maximum payload size in bytes."""
class Filter(ComplexAttribute):
supported: Annotated[Optional[bool], Mutability.read_only, Required.true] = None
"""A Boolean value specifying whether or not the operation is supported."""
max_results: Annotated[Optional[int], Mutability.read_only, Required.true] = None
"""An integer value specifying the maximum number of resources returned in a response."""
class ChangePassword(ComplexAttribute):
supported: Annotated[Optional[bool], Mutability.read_only, Required.true] = None
"""A Boolean value specifying whether or not the operation is supported."""
class Sort(ComplexAttribute):
supported: Annotated[Optional[bool], Mutability.read_only, Required.true] = None
"""A Boolean value specifying whether or not the operation is supported."""
class ETag(ComplexAttribute):
supported: Annotated[Optional[bool], Mutability.read_only, Required.true] = None
"""A Boolean value specifying whether or not the operation is supported."""
class AuthenticationScheme(ComplexAttribute):
class Type(str, Enum):
oauth = "oauth"
oauth2 = "oauth2"
oauthbearertoken = "oauthbearertoken"
httpbasic = "httpbasic"
httpdigest = "httpdigest"
type: Annotated[Optional[Type], Mutability.read_only, Required.true] = Field(
None,
examples=["oauth", "oauth2", "oauthbearertoken", "httpbasic", "httpdigest"],
)
"""The authentication scheme."""
name: Annotated[Optional[str], Mutability.read_only, Required.true] = None
"""The common authentication scheme name, e.g., HTTP Basic."""
description: Annotated[Optional[str], Mutability.read_only, Required.true] = None
"""A description of the authentication scheme."""
spec_uri: Annotated[
Optional[Reference[ExternalReference]], Mutability.read_only
] = None
"""An HTTP-addressable URL pointing to the authentication scheme's
specification."""
documentation_uri: Annotated[
Optional[Reference[ExternalReference]], Mutability.read_only
] = None
"""An HTTP-addressable URL pointing to the authentication scheme's usage
documentation."""
primary: Annotated[Optional[bool], Mutability.read_only] = None
"""A Boolean value indicating the 'primary' or preferred attribute value
for this attribute, e.g., the preferred mailing address or primary email
address."""
class ServiceProviderConfig(Resource[Any]):
schemas: Annotated[list[str], Required.true] = [
"urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"
]
id: Annotated[
Optional[str], Mutability.read_only, Returned.default, Uniqueness.global_
] = None
"""A unique identifier for a SCIM resource as defined by the service
provider."""
# RFC7643 §5
# Unlike other core
# resources, the "id" attribute is not required for the service
# provider configuration resource
documentation_uri: Annotated[
Optional[Reference[ExternalReference]], Mutability.read_only
] = None
"""An HTTP-addressable URL pointing to the service provider's human-
consumable help documentation."""
patch: Annotated[Optional[Patch], Mutability.read_only, Required.true] = None
"""A complex type that specifies PATCH configuration options."""
bulk: Annotated[Optional[Bulk], Mutability.read_only, Required.true] = None
"""A complex type that specifies bulk configuration options."""
filter: Annotated[Optional[Filter], Mutability.read_only, Required.true] = None
"""A complex type that specifies FILTER options."""
change_password: Annotated[
Optional[ChangePassword], Mutability.read_only, Required.true
] = None
"""A complex type that specifies configuration options related to changing
a password."""
sort: Annotated[Optional[Sort], Mutability.read_only, Required.true] = None
"""A complex type that specifies sort result options."""
etag: Annotated[Optional[ETag], Mutability.read_only, Required.true] = None
"""A complex type that specifies ETag configuration options."""
authentication_schemes: Annotated[
Optional[list[AuthenticationScheme]], Mutability.read_only, Required.true
] = None
"""A complex type that specifies supported authentication scheme
properties."""