mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 18:52:07 +08:00
25 lines
478 B
Ruby
25 lines
478 B
Ruby
module Api
|
|
class << self
|
|
attr_accessor :configuration
|
|
end
|
|
|
|
def self.configuration
|
|
@configuration ||= Configuration.new
|
|
end
|
|
|
|
def self.configure
|
|
yield(configuration)
|
|
end
|
|
|
|
class Configuration
|
|
attr_accessor :core_api_sign_alg
|
|
attr_accessor :core_api_token_ttl
|
|
attr_accessor :core_api_token_iss
|
|
|
|
def initialize
|
|
@core_api_sign_alg = 'HS256'
|
|
@core_api_token_ttl = 30.minutes
|
|
@core_api_token_iss = 'SciNote'
|
|
end
|
|
end
|
|
end
|