Class: Firebase::Auth::IDToken
- Inherits:
-
Object
- Object
- Firebase::Auth::IDToken
show all
- Defined in:
- lib/firebase/auth/id_token.rb,
lib/firebase/auth/id_token/config.rb,
lib/firebase/auth/id_token/errors.rb,
lib/firebase/auth/id_token/version.rb,
lib/firebase/auth/id_token/public_keys.rb
Defined Under Namespace
Classes: Config, Error, PublicKey, PublicKeys
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(token) ⇒ IDToken
Returns a new instance of IDToken.
21
22
23
24
|
# File 'lib/firebase/auth/id_token.rb', line 21
def initialize(token)
@token = token
raise Error::ProjectIdNotSet.new('project_id is not set, please set') unless self.class.config.project_id
end
|
Class Method Details
.config ⇒ Object
16
17
18
|
# File 'lib/firebase/auth/id_token.rb', line 16
def config
@config ||= Config.new
end
|
12
13
14
|
# File 'lib/firebase/auth/id_token.rb', line 12
def configure
yield config
end
|
Instance Method Details
#verify! ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/firebase/auth/id_token.rb', line 26
def verify!
decode!
set_certificate
verify_decoded_token!
verify_token!
[@payload, @header]
end
|