1 00:00:00,000 --> 00:00:02,350 [No Audio] 2 00:00:02,350 --> 00:00:04,376 So now we made that code quite nicer there. 3 00:00:04,376 --> 00:00:06,370 As a developer, I feel kind of guilty 4 00:00:06,370 --> 00:00:08,828 that we've put it in an AuthenticationService. 5 00:00:08,828 --> 00:00:10,242 So let's do what we're going to do initially and 6 00:00:10,256 --> 00:00:12,860 let's just break it out into a separate user service. 7 00:00:12,860 --> 00:00:14,810 [No Audio] 8 00:00:14,810 --> 00:00:16,260 So let's call it User 9 00:00:16,260 --> 00:00:19,432 [No Audio] 10 00:00:19,432 --> 00:00:21,210 LookupService. 11 00:00:21,210 --> 00:00:23,376 I don't know, whatever it might be anyway. 12 00:00:23,376 --> 00:00:25,175 And then we'll take these methods here 13 00:00:25,175 --> 00:00:28,559 [No Audio] 14 00:00:28,559 --> 00:00:31,120 and strip those out, put them in here. 15 00:00:31,120 --> 00:00:34,970 [No Audio] 16 00:00:34,970 --> 00:00:37,971 And now we need to use the repository to go as well. 17 00:00:37,971 --> 00:00:40,136 The authentication service still needs to 18 00:00:40,136 --> 00:00:41,810 use a repository, of course. So we'll still leave that 19 00:00:41,810 --> 00:00:44,076 in place. But we'll just copy across this reference 20 00:00:44,076 --> 00:00:46,889 here so the user look up services can use it as well 21 00:00:46,889 --> 00:00:49,139 [No Audio] 22 00:00:49,139 --> 00:00:51,890 okay and then go back to AuthenticationService. 23 00:00:51,890 --> 00:00:54,872 Tidy imports. You can see now it's removed to import. 24 00:00:54,872 --> 00:00:56,504 That's why it's good practice to get into, 25 00:00:56,504 --> 00:00:57,956 even though we couldn't see that because of 26 00:00:57,956 --> 00:01:00,423 the ellipses here, the three dots. 27 00:01:00,423 --> 00:01:04,544 It's still nice just to get into that practice and now 28 00:01:04,544 --> 00:01:07,460 use the lookup service is we have this as the code. 29 00:01:07,460 --> 00:01:09,893 Let's run all the tests again to make sure we're okay. 30 00:01:09,893 --> 00:01:13,050 [No Audio] 31 00:01:13,050 --> 00:01:15,383 Yeah. No regression be introduced. That's fine. 32 00:01:15,383 --> 00:01:16,316 So we're good to go.