Documentation ¶
Index ¶
- Constants
- func Verify(pk *PublicKey, signature, msg []byte) (bool, error)
- func VerifyEddsaSignature(pubKey string, sig, message []byte) error
- type AuthConfig
- type AuthServer
- func (auth *AuthServer) GetAuthNonce(ctx context.Context, req *authtypes.GetAuthNonceRequest) (resp *authtypes.GetAuthNonceResponse, err error)
- func (auth *AuthServer) Name() string
- func (auth *AuthServer) Start(ctx context.Context) error
- func (auth *AuthServer) Stop(ctx context.Context) error
- func (auth *AuthServer) UpdateUserPublicKey(ctx context.Context, req *authtypes.UpdateUserPublicKeyRequest) (*authtypes.UpdateUserPublicKeyResponse, error)
- func (auth *AuthServer) VerifyOffChainSignature(ctx context.Context, req *authtypes.VerifyOffChainSignatureRequest) (*authtypes.VerifyOffChainSignatureResponse, error)
- type PublicKey
Constants ¶
View Source
const (
OffChainAuthSigExpiryAgeInSec int32 = 60 * 5 // in 300 seconds
)
Variables ¶
This section is empty.
Functions ¶
func VerifyEddsaSignature ¶
VerifyEddsaSignature EDDSA sig verification
Types ¶
type AuthConfig ¶
type AuthConfig struct { GRPCAddress string SpDBConfig *config.SQLDBConfig SpOperatorAddress string }
AuthConfig is the auth service config
type AuthServer ¶
type AuthServer struct {
// contains filtered or unexported fields
}
AuthServer auth service
func NewAuthServer ¶
func NewAuthServer(config *AuthConfig) (*AuthServer, error)
NewAuthServer return an instance of AuthServer
func (*AuthServer) GetAuthNonce ¶
func (auth *AuthServer) GetAuthNonce(ctx context.Context, req *authtypes.GetAuthNonceRequest) (resp *authtypes.GetAuthNonceResponse, err error)
GetAuthNonce get the auth nonce for which the Dapp or client can generate EDDSA key pairs.
func (*AuthServer) Name ¶
func (auth *AuthServer) Name() string
Name return the auth server name, for the lifecycle management
func (*AuthServer) Start ¶
func (auth *AuthServer) Start(ctx context.Context) error
Start the auth gRPC service
func (*AuthServer) Stop ¶
func (auth *AuthServer) Stop(ctx context.Context) error
Stop the auth gRPC service and recycle the resources
func (*AuthServer) UpdateUserPublicKey ¶
func (auth *AuthServer) UpdateUserPublicKey(ctx context.Context, req *authtypes.UpdateUserPublicKeyRequest) (*authtypes.UpdateUserPublicKeyResponse, error)
UpdateUserPublicKey updates the user public key once the Dapp or client generates the EDDSA key pairs.
func (*AuthServer) VerifyOffChainSignature ¶
func (auth *AuthServer) VerifyOffChainSignature(ctx context.Context, req *authtypes.VerifyOffChainSignatureRequest) (*authtypes.VerifyOffChainSignatureResponse, error)
VerifyOffChainSignature verifies the signature signed by user's EDDSA private key.
Directories ¶
Path | Synopsis |
---|---|
Package mock_client is a generated GoMock package.
|
Package mock_client is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.