parent
d1f36f42c0
commit
091053507d
@ -0,0 +1,56 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.webauthn;
|
||||||
|
|
||||||
|
// Sugar for easier handling in Java
|
||||||
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
option java_outer_classname = "TrezorMessageWebAuthn";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: List resident credentials
|
||||||
|
* @start
|
||||||
|
* @next WebAuthnCredentials
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message WebAuthnListResidentCredentials {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Add resident credential
|
||||||
|
* @start
|
||||||
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message WebAuthnAddResidentCredential {
|
||||||
|
optional bytes credential_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Remove resident credential
|
||||||
|
* @start
|
||||||
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message WebAuthnRemoveResidentCredential {
|
||||||
|
optional uint32 index = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Resident credential list
|
||||||
|
* @start
|
||||||
|
* @next end
|
||||||
|
*/
|
||||||
|
message WebAuthnCredentials {
|
||||||
|
repeated WebAuthnCredential credentials = 1;
|
||||||
|
message WebAuthnCredential {
|
||||||
|
optional uint32 index = 1;
|
||||||
|
optional bytes id = 2;
|
||||||
|
optional string rp_id = 3;
|
||||||
|
optional string rp_name = 4;
|
||||||
|
optional bytes user_id = 5;
|
||||||
|
optional string user_name = 6;
|
||||||
|
optional string user_display_name = 7;
|
||||||
|
optional uint32 creation_time = 8;
|
||||||
|
optional bool hmac_secret = 9;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnAddResidentCredential(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 802
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
credential_id: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.credential_id = credential_id
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('credential_id', p.BytesType, 0),
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnCredential(p.MessageType):
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
index: int = None,
|
||||||
|
id: bytes = None,
|
||||||
|
rp_id: str = None,
|
||||||
|
rp_name: str = None,
|
||||||
|
user_id: bytes = None,
|
||||||
|
user_name: str = None,
|
||||||
|
user_display_name: str = None,
|
||||||
|
creation_time: int = None,
|
||||||
|
hmac_secret: bool = None,
|
||||||
|
) -> None:
|
||||||
|
self.index = index
|
||||||
|
self.id = id
|
||||||
|
self.rp_id = rp_id
|
||||||
|
self.rp_name = rp_name
|
||||||
|
self.user_id = user_id
|
||||||
|
self.user_name = user_name
|
||||||
|
self.user_display_name = user_display_name
|
||||||
|
self.creation_time = creation_time
|
||||||
|
self.hmac_secret = hmac_secret
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('index', p.UVarintType, 0),
|
||||||
|
2: ('id', p.BytesType, 0),
|
||||||
|
3: ('rp_id', p.UnicodeType, 0),
|
||||||
|
4: ('rp_name', p.UnicodeType, 0),
|
||||||
|
5: ('user_id', p.BytesType, 0),
|
||||||
|
6: ('user_name', p.UnicodeType, 0),
|
||||||
|
7: ('user_display_name', p.UnicodeType, 0),
|
||||||
|
8: ('creation_time', p.UVarintType, 0),
|
||||||
|
9: ('hmac_secret', p.BoolType, 0),
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
from .WebAuthnCredential import WebAuthnCredential
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnCredentials(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 801
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
credentials: List[WebAuthnCredential] = None,
|
||||||
|
) -> None:
|
||||||
|
self.credentials = credentials if credentials is not None else []
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('credentials', WebAuthnCredential, p.FLAG_REPEATED),
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnListResidentCredentials(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 800
|
@ -0,0 +1,26 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnRemoveResidentCredential(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 803
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
index: int = None,
|
||||||
|
) -> None:
|
||||||
|
self.index = index
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('index', p.UVarintType, 0),
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnAddResidentCredential(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 802
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
credential_id: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.credential_id = credential_id
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('credential_id', p.BytesType, 0),
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnCredential(p.MessageType):
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
index: int = None,
|
||||||
|
id: bytes = None,
|
||||||
|
rp_id: str = None,
|
||||||
|
rp_name: str = None,
|
||||||
|
user_id: bytes = None,
|
||||||
|
user_name: str = None,
|
||||||
|
user_display_name: str = None,
|
||||||
|
creation_time: int = None,
|
||||||
|
hmac_secret: bool = None,
|
||||||
|
) -> None:
|
||||||
|
self.index = index
|
||||||
|
self.id = id
|
||||||
|
self.rp_id = rp_id
|
||||||
|
self.rp_name = rp_name
|
||||||
|
self.user_id = user_id
|
||||||
|
self.user_name = user_name
|
||||||
|
self.user_display_name = user_display_name
|
||||||
|
self.creation_time = creation_time
|
||||||
|
self.hmac_secret = hmac_secret
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('index', p.UVarintType, 0),
|
||||||
|
2: ('id', p.BytesType, 0),
|
||||||
|
3: ('rp_id', p.UnicodeType, 0),
|
||||||
|
4: ('rp_name', p.UnicodeType, 0),
|
||||||
|
5: ('user_id', p.BytesType, 0),
|
||||||
|
6: ('user_name', p.UnicodeType, 0),
|
||||||
|
7: ('user_display_name', p.UnicodeType, 0),
|
||||||
|
8: ('creation_time', p.UVarintType, 0),
|
||||||
|
9: ('hmac_secret', p.BoolType, 0),
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
from .WebAuthnCredential import WebAuthnCredential
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnCredentials(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 801
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
credentials: List[WebAuthnCredential] = None,
|
||||||
|
) -> None:
|
||||||
|
self.credentials = credentials if credentials is not None else []
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('credentials', WebAuthnCredential, p.FLAG_REPEATED),
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnListResidentCredentials(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 800
|
@ -0,0 +1,26 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List, Optional
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
Dict, List, Optional = None, None, None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class WebAuthnRemoveResidentCredential(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 803
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
index: int = None,
|
||||||
|
) -> None:
|
||||||
|
self.index = index
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls) -> Dict:
|
||||||
|
return {
|
||||||
|
1: ('index', p.UVarintType, 0),
|
||||||
|
}
|
Loading…
Reference in new issue