Add client_secret_expires_at to OAuth Applications (#30317)
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
class REST::CredentialApplicationSerializer < REST::ApplicationSerializer
 | 
			
		||||
  attributes :client_id, :client_secret
 | 
			
		||||
  attributes :client_id, :client_secret, :client_secret_expires_at
 | 
			
		||||
 | 
			
		||||
  def client_id
 | 
			
		||||
    object.uid
 | 
			
		||||
@@ -10,4 +10,10 @@ class REST::CredentialApplicationSerializer < REST::ApplicationSerializer
 | 
			
		||||
  def client_secret
 | 
			
		||||
    object.secret
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  # Added for future forwards compatibility when we may decide to expire OAuth
 | 
			
		||||
  # Applications. Set to zero means that the client_secret never expires.
 | 
			
		||||
  def client_secret_expires_at
 | 
			
		||||
    0
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user