عَنْ رَبِيعَةَ بْنِ كَعْبٍ الْأَسْلَمِيِّ ‏-رِضَى اَللَّهُ عَنْهُ‏- قَالَ : { قَالَ لِي اَلنَّبِيُّ ‏- صلى الله عليه وسلم ‏-سَلْ.‏ فَقُلْتُ : أَسْأَلُكَ مُرَافَقَتَكَ فِي اَلْجَنَّةِ.‏ فَقَالَ : أَوَغَيْرَ ذَلِكَ ?, قُلْتُ : هُوَ ذَاكَ, قَالَ : " فَأَعِنِّي عَلَى نَفْسِكَ بِكَثْرَةِ اَلسُّجُودِ } رَوَاهُ مُسْلِمٌ.‏ 1‏

‏1 ‏- صحيح.‏ رواه مسلم ( 489 )‏.‏

Translation
Narrated [Abu Hurairah (RA)]

Umar came over Hassan while reciting poetry inside the mosque and looked at him sternly, then he (Hassan) said: "I used to recite poetry inside it (the mosque) in the presence of one who is more pious than you [i.e. the Prophet (ﷺ)]".[Agreed upon].