authd/src/authd.cr

35 lines
731 B
Crystal
Raw Normal View History

2019-11-22 18:14:52 +01:00
require "json"
require "jwt"
require "ipc"
require "baguette-crystal-base"
require "./user.cr"
# Allows get configuration from a provided file.
# See Baguette::Configuration::Base.get
class Baguette::Configuration
2020-11-08 22:50:24 +01:00
class Auth < IPC
include YAML::Serializable
2020-10-25 19:36:28 +01:00
property login : String? = nil
property pass : String? = nil
2020-11-22 13:49:34 +01:00
property shared_key : String = "nico-nico-nii" # Default authd key, as per the specs. :eyes:
2020-10-25 19:36:28 +01:00
property shared_key_file : String? = nil
def initialize
end
end
end
class AuthD::Service < IPC::Server
end
2020-11-22 13:49:34 +01:00
# Requests and responses.
require "./exceptions"
2020-10-31 00:46:14 +01:00
2020-11-22 13:49:34 +01:00
# Requests and responses.
require "./network"
2020-07-14 17:48:16 +02:00
2020-11-22 13:49:34 +01:00
# Functions to request the authd server.
require "./libclient.cr"