Module: DoorkeeperMongodb::Mixins::Mongoid::AccessGrantMixin
- Extended by:
- ActiveSupport::Concern
- Includes:
- Doorkeeper::Models::Accessible, Doorkeeper::Models::Expirable, Doorkeeper::Models::Revocable, Doorkeeper::Models::Scopes, Doorkeeper::Models::SecretStorable, Doorkeeper::OAuth::Helpers, Doorkeeper::Orm::Concerns::Mongoid::ResourceOwnerable, BaseMixin, JsonSerializable
- Included in:
- Doorkeeper::AccessGrant
- Defined in:
- lib/doorkeeper-mongodb/mixins/mongoid/access_grant_mixin.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #pkce_supported? ⇒ Boolean
- #plaintext_token ⇒ Object
-
#uses_pkce? ⇒ Boolean
never uses pkce, if pkce migrations were not generated.
Methods included from JsonSerializable
Instance Method Details
#pkce_supported? ⇒ Boolean
51 52 53 |
# File 'lib/doorkeeper-mongodb/mixins/mongoid/access_grant_mixin.rb', line 51 def pkce_supported? respond_to? :code_challenge end |
#plaintext_token ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/doorkeeper-mongodb/mixins/mongoid/access_grant_mixin.rb', line 55 def plaintext_token if secret_strategy.allows_restoring_secrets? secret_strategy.restore_secret(self, :token) else @raw_token end end |
#uses_pkce? ⇒ Boolean
never uses pkce, if pkce migrations were not generated
47 48 49 |
# File 'lib/doorkeeper-mongodb/mixins/mongoid/access_grant_mixin.rb', line 47 def uses_pkce? pkce_supported? && code_challenge.present? end |