2019-11-22 18:14:52 +01:00
|
|
|
require "json"
|
2018-09-22 21:25:03 +02:00
|
|
|
require "jwt"
|
2018-11-12 18:51:21 +01:00
|
|
|
require "ipc"
|
2018-09-22 21:42:21 +02:00
|
|
|
|
2020-10-23 19:16:49 +02:00
|
|
|
require "baguette-crystal-base"
|
2018-11-12 18:51:21 +01:00
|
|
|
require "./user.cr"
|
2018-09-22 21:25:03 +02:00
|
|
|
|
2020-10-23 19:16:49 +02:00
|
|
|
# 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
|
2020-10-23 19:16:49 +02:00
|
|
|
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
|
2020-10-23 19:16:49 +02:00
|
|
|
end
|
|
|
|
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"
|