Sha256: 977bb14fa7fdeed2257c47ab216bd9fd7c9755fdfe42c43ecb33e94fdbccd3d5
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
@namespace("Switchboard") protocol UserAuthentication { /** The main User class */ record UserAuthenticationUser { /** The primary key */ int id; /** Their name */ string name; /** The email address of the user */ string email_address; /** An array of the names of all permissions the user has */ array<string> permissions; /** The id of the lawyer this user has claimed, if any */ union {null, int} lawyer_id; } record UserAuthentication { /** The authorized user */ UserAuthenticationUser user; /** An OAuth2 access token the client can use on this user's behalf */ string access_token; } /** When registering a user, provide these options */ record UserRegistrationParams { /** User's email address */ string email_address; /** User's new password */ string password; /** User's display name name */ union{string, null} name; } /** All the allowed different social networks that we can auth via */ enum SocialNetwork { FACEBOOK, GOOGLE, TWITTER, LINKEDIN } /** POST: Register a user by email_address and password */ array<UserAuthentication> register(UserRegistrationParams user); /** POST: Authenticate a user via email_address and password */ array<UserAuthentication> authenticate(string email_address, string password); /** POST: Login or register via a social network */ array<UserAuthentication> find_or_create_via_social(SocialNetwork social_network, string access_token, union{null, string} secret); }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
switchboard-contract-1.9.5 | contracts/3/source/user_authentication.avdl |