syntax = "proto3"; package authentication; service AuthenticationService { rpc Validate(AuthenticationByNamePassword) returns (Id); rpc Create(Authentication) returns (Id); rpc AddUsername(UsernameWithId) returns (Id); rpc UpdatePassword(Password) returns (Id); rpc UpdateUsername(UsernameWithId) returns (Id); rpc DeleteUsername(Name) returns (Id); rpc Delete(UserId) returns (Empty); } message AuthenticationByNamePassword { string name = 1; string password = 2; } message Authentication { string userId = 1; repeated Username usernames = 2; string password = 3; } message Password { string userId = 1; string password = 2; } message Username { string name = 1; string type = 2; } message UsernameWithId { string userId = 1; string name = 2; string type = 3; } message Name { string name = 1; } message Id { string id = 1; } message UserId { string userId = 1; } message Empty {}