Class: Ksef::Credentials::Token
- Inherits:
-
Object
- Object
- Ksef::Credentials::Token
- Defined in:
- lib/ksef/credentials/token.rb
Overview
A long-lived KSeF integration token, minted in the KSeF portal after Profil Zaufany / qualified-seal login.
The raw token value is treated as opaque; it is encrypted with the KSeF public RSA key during the Sessions init flow.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Token
constructor
A new instance of Token.
- #to_s ⇒ Object (also: #inspect)
- #type ⇒ Object
Constructor Details
#initialize(value) ⇒ Token
Returns a new instance of Token.
13 14 15 16 17 |
# File 'lib/ksef/credentials/token.rb', line 13 def initialize(value) raise ConfigurationError, "Token value cannot be blank" if value.nil? || value.to_s.empty? @value = value.to_s end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
11 12 13 |
# File 'lib/ksef/credentials/token.rb', line 11 def value @value end |
Instance Method Details
#to_s ⇒ Object Also known as: inspect
23 24 25 |
# File 'lib/ksef/credentials/token.rb', line 23 def to_s "#<Ksef::Credentials::Token value=[REDACTED]>" end |
#type ⇒ Object
19 20 21 |
# File 'lib/ksef/credentials/token.rb', line 19 def type :token end |