@@ -23,14 +23,64 @@ import securesocial.core.IdentityProvider
23
23
* A RoutesService that resolves the routes for some of the pages
24
24
*/
25
25
trait RoutesService {
26
+ /**
27
+ * The login page url
28
+ */
26
29
def loginPageUrl (implicit req : RequestHeader ): String
27
- def signUpUrl (implicit req : RequestHeader ): String
30
+
31
+ /**
32
+ * The page that starts the sign up flow
33
+ */
34
+ def startSignUpUrl (implicit req : RequestHeader ): String
35
+
36
+ /**
37
+ * The url that processes submissions from the start sign up page
38
+ */
39
+ def handleStartSignUpUrl (implicit req : RequestHeader ): String
40
+
41
+ /**
42
+ * The sign up page
43
+ */
28
44
def signUpUrl (mailToken : String )(implicit req : RequestHeader ): String
45
+
46
+ /**
47
+ * The url that processes submissions from the sign up page
48
+ */
29
49
def handleSignUpUrl (mailToken : String )(implicit req : RequestHeader ): String
30
- def resetPasswordUrl (implicit req : RequestHeader ): String
31
- def resetPasswordUrl (mailToken : String )(implicit req : RequestHeader ): String
50
+
51
+ /**
52
+ * The page that starts the reset password flow
53
+ */
54
+ def startResetPasswordUrl (implicit req : RequestHeader ): String
55
+
56
+ /**
57
+ * The url that processes submissions from the start reset password page
58
+ */
32
59
def handleStartResetPasswordUrl (implicit req : RequestHeader ): String
33
- def handleStartResetPasswordUrl (mailToken : String )(implicit req : RequestHeader ): String
60
+
61
+ /**
62
+ * The reset password page
63
+ */
64
+ def resetPasswordUrl (mailToken : String )(implicit req : RequestHeader ): String
65
+
66
+ /**
67
+ * The url that processes submissions from the reset password page
68
+ */
69
+ def handleResetPasswordUrl (mailToken : String )(implicit req : RequestHeader ): String
70
+
71
+ /**
72
+ * The password change page
73
+ */
74
+ def passwordChangeUrl (implicit req : RequestHeader ): String
75
+
76
+ /**
77
+ * The url that processes submissions from the password change page
78
+ */
79
+ def handlePasswordChangeUrl (implicit req : RequestHeader ): String
80
+
81
+ /**
82
+ * The url to start an authentication flow with the given provider
83
+ */
34
84
def authenticationUrl (provider : String , redirectTo : Option [String ] = None )(implicit req : RequestHeader ): String
35
85
def faviconPath : Call
36
86
def jqueryPath : Call
@@ -60,10 +110,14 @@ object RoutesService {
60
110
absoluteUrl(securesocial.controllers.routes.LoginPage .login())
61
111
}
62
112
63
- override def signUpUrl (implicit req : RequestHeader ): String = {
113
+ override def startSignUpUrl (implicit req : RequestHeader ): String = {
64
114
absoluteUrl(securesocial.controllers.routes.Registration .startSignUp())
65
115
}
66
116
117
+ override def handleStartSignUpUrl (implicit req : RequestHeader ): String = {
118
+ absoluteUrl(securesocial.controllers.routes.Registration .handleStartSignUp())
119
+ }
120
+
67
121
override def signUpUrl (mailToken : String )(implicit req : RequestHeader ): String = {
68
122
absoluteUrl(securesocial.controllers.routes.Registration .signUp(mailToken))
69
123
}
@@ -72,20 +126,28 @@ object RoutesService {
72
126
absoluteUrl(securesocial.controllers.routes.Registration .handleSignUp(mailToken))
73
127
}
74
128
75
- override def resetPasswordUrl (implicit request : RequestHeader ): String = {
129
+ override def startResetPasswordUrl (implicit request : RequestHeader ): String = {
76
130
absoluteUrl(securesocial.controllers.routes.PasswordReset .startResetPassword())
77
131
}
78
132
133
+ override def handleStartResetPasswordUrl (implicit req : RequestHeader ): String = {
134
+ absoluteUrl(securesocial.controllers.routes.PasswordReset .handleStartResetPassword())
135
+ }
136
+
79
137
override def resetPasswordUrl (mailToken : String )(implicit req : RequestHeader ): String = {
80
138
absoluteUrl(securesocial.controllers.routes.PasswordReset .resetPassword(mailToken))
81
139
}
82
140
83
- override def handleStartResetPasswordUrl (implicit req : RequestHeader ): String = {
84
- absoluteUrl(securesocial.controllers.routes.PasswordReset .handleStartResetPassword( ))
141
+ override def handleResetPasswordUrl ( mailToken : String ) (implicit req : RequestHeader ): String = {
142
+ absoluteUrl(securesocial.controllers.routes.PasswordReset .handleResetPassword(mailToken ))
85
143
}
86
144
87
- override def handleStartResetPasswordUrl (mailToken : String )(implicit req : RequestHeader ): String = {
88
- absoluteUrl(securesocial.controllers.routes.PasswordReset .handleResetPassword(mailToken))
145
+ override def passwordChangeUrl (implicit req : RequestHeader ): String = {
146
+ absoluteUrl(securesocial.controllers.routes.PasswordChange .page())
147
+ }
148
+
149
+ override def handlePasswordChangeUrl (implicit req : RequestHeader ): String = {
150
+ absoluteUrl(securesocial.controllers.routes.PasswordChange .handlePasswordChange)
89
151
}
90
152
91
153
override def authenticationUrl (provider : String , redirectTo : Option [String ] = None )(implicit req : RequestHeader ): String = {
0 commit comments