'encrypted', 'client_secret' => 'encrypted', 'access_token' => 'encrypted', 'refresh_token' => 'encrypted', 'token_expires_at' => 'datetime', 'refresh_token_expires_at' => 'datetime', 'is_connected' => 'boolean', ]; } public function preregistrationPage(): BelongsTo { return $this->belongsTo(PreregistrationPage::class); } public function isTokenExpired(): bool { return ! $this->token_expires_at || $this->token_expires_at->isPast(); } public function isRefreshTokenExpired(): bool { if ($this->refresh_token_expires_at === null) { return false; } return $this->refresh_token_expires_at->isPast(); } }