credential_application_serializer.rb 456 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. class REST::CredentialApplicationSerializer < REST::ApplicationSerializer
  3. attributes :client_id, :client_secret, :client_secret_expires_at
  4. def client_id
  5. object.uid
  6. end
  7. def client_secret
  8. object.secret
  9. end
  10. # Added for future forwards compatibility when we may decide to expire OAuth
  11. # Applications. Set to zero means that the client_secret never expires.
  12. def client_secret_expires_at
  13. 0
  14. end
  15. end