Skip to content

Commit

Permalink
Add confirm email page and confirmed email page.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliDy committed Mar 13, 2015
1 parent 842365d commit 07daee4
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 38 deletions.
9 changes: 9 additions & 0 deletions app/com/yetu/oauth2provider/controllers/setup/SetupPage.scala
Expand Up @@ -12,4 +12,13 @@ object SetupPage extends Controller {
val registration = Action {
Ok(views.html.registration.render())
}

val confirmmail = Action {
Ok(views.html.confirmmail.render())
}

val confirmedmail = Action {
Ok(views.html.confirmedmail.render())
}

}
44 changes: 44 additions & 0 deletions app/com/yetu/oauth2provider/views/confirmedmail.scala.html
@@ -0,0 +1,44 @@
<!DOCTYPE html>

<html>
<head>
<title>Successfully confirmed mail</title>
<link rel="stylesheet" media="screen" href="@controllers.routes.Assets.at("stylesheets/setup.css")">
<link rel="stylesheet" media="screen" href="@controllers.routes.Assets.at("stylesheets/confirmedmail.css")">
<link rel="shortcut icon" type="image/png" href="">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<header>
<h1>@Messages("setup.headline")</h1>
<h2>@Messages("setup.subheadline")</h2>
</header>
<div class="steps">
<ul class="steplist">
<li class="step active">@Messages("setup.steps.one")</li>
<li class="step">@Messages("setup.steps.two")</li>
<li class="step">@Messages("setup.steps.three")</li>
</ul>
</div>
<div class="content">
<div class="full">
<div class="full__container">
<img class="full__icon"/>
<div class="full__content">
<h2>@Messages("setup.confirmedmail.headline")</h2>
<p>@Messages("setup.confirmedmail.description")</p>
</div>
</div>
<a href="/setup/download" class="button full__button">
@Html(Messages("setup.next"))
</a>
</div>
</div>
<footer>
<span>@Html(Messages("setup.footer.copyright"))</span><span class="dot">&middot;</span>
<a href="">@Messages("setup.footer.privacy")</a><span class="dot">&middot;</span>
<a href="http://yetu.com/imprint/">@Messages("setup.footer.imprint")</a><span class="dot">&middot;</span>
<a href="">@Html(Messages("setup.footer.terms"))</a>
</footer>
</body>
</html>
40 changes: 40 additions & 0 deletions app/com/yetu/oauth2provider/views/confirmmail.scala.html
@@ -0,0 +1,40 @@
<!DOCTYPE html>

<html>
<head>
<title>Confirm Mail</title>
<link rel="stylesheet" media="screen" href="@controllers.routes.Assets.at("stylesheets/setup.css")">
<link rel="stylesheet" media="screen" href="@controllers.routes.Assets.at("stylesheets/confirmmail.css")">
<link rel="shortcut icon" type="image/png" href="">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<header>
<h1>@Messages("setup.headline")</h1>
<h2>@Messages("setup.subheadline")</h2>
</header>
<div class="steps">
<ul class="steplist">
<li class="step active">@Messages("setup.steps.one")</li>
<li class="step active">@Messages("setup.steps.two")</li>
<li class="step">@Messages("setup.steps.three")</li>
</ul>
</div>
<div class="content">
<div class="left">
<img class="left__img" href="" alt="E-Mail content"/>
</div>
<div class="right">
<h2>@Messages("setup.confirmmail.headline")</h2>
<p>@Messages("setup.confirmmail.description")</p>
</div>
<div class="clear"></div>
</div>
<footer>
<span>@Html(Messages("setup.footer.copyright"))</span><span class="dot">&middot;</span>
<a href="">@Messages("setup.footer.privacy")</a><span class="dot">&middot;</span>
<a href="http://yetu.com/imprint/">@Messages("setup.footer.imprint")</a><span class="dot">&middot;</span>
<a href="">@Html(Messages("setup.footer.terms"))</a>
</footer>
</body>
</html>
7 changes: 3 additions & 4 deletions app/com/yetu/oauth2provider/views/registration.scala.html
Expand Up @@ -2,7 +2,7 @@

<html>
<head>
<title>Download</title>
<title>Registration</title>
<link rel="stylesheet" media="screen" href="@controllers.routes.Assets.at("stylesheets/setup.css")">
<link rel="stylesheet" media="screen" href="@controllers.routes.Assets.at("stylesheets/registration.css")">
<link rel="shortcut icon" type="image/png" href="">
Expand Down Expand Up @@ -50,8 +50,7 @@ <h2><input class="radio-btn" type="radio" name="registered" value="not" checked=
<label class="left__label" >@Messages("setup.registration.repeatpassword")</label>
<input type="password" class="left__input" type="text" name="repeatpassword"
placeholder="@Messages("setup.registration.repeatpasswordplaceholder")"/>
<span id="repeatpassword_error" class="left__error">@Messages("setup.registration.error" +
".passwordnotsame")</span>
<span id="repeatpassword_error" class="left__error">@Messages("setup.registration.error.passwordnotsame")</span>
<div class="clear"></div>
<input class="left__terms-input" type="checkbox" name="terms" value="termsaccepted"
data-validate="agreement"/>
Expand All @@ -69,7 +68,7 @@ <h2><input class="radio-btn" type="radio" name="registered" value="already"/><l
</div>
<div class="buttoncontainer clear">
<button type="commit" form="registration_form" class="button buttoncontainer__next-button">
@Messages("setup.registration.next")
@Html(Messages("setup.next"))
</button>
</div>
</div>
Expand Down
11 changes: 10 additions & 1 deletion conf/messages
Expand Up @@ -98,6 +98,7 @@ setup.footer.copyright=&copy; 2015 yetu AG
setup.footer.privacy=Privacy Policy
setup.footer.imprint=Imprint
setup.footer.terms=Terms &amp; conditions
setup.next=next &gt;

#setup registration page
setup.registration.register=Register at yetu
Expand All @@ -114,7 +115,6 @@ setup.registration.repeatpasswordplaceholder=repeat new password for yetu login
setup.registration.terms=I accept the
setup.registration.termslink=terms &amp; conditions
setup.registration.ifalreadyregistered=If you already have your e-mail and password registered at yetu, you can go to step 3 directly. Just click "next".
setup.registration.next=next

setup.registration.error.firstname=Please use only characters for your first name.
setup.registration.error.lastname=Please use only characters for your last name.
Expand All @@ -124,6 +124,15 @@ setup.registration.error.password=Your password has to have at least 8 character
setup.registration.error.passwordnotsame=Your password and the repeated password are not the same.
setup.registration.error.terms=Please read the terms &amp; conditions and mark, that you have done this.

#setup mail confirm page
setup.confirmmail.headline=Check yout email inbox and click in the registration link to proceed.
setup.confirmmail.description=We just sent you an email to the email address you provided. Please check it, and click\
in the link provided in the email to verify your email address and allow the creation of your yetu account.

#setup mail confirmed page
setup.confirmedmail.headline=Your e-mail has been verified and your yetu account is created
setup.confirmedmail.description=You can proceed to next step now.

#setup download page
setup.download.headline=Download Gateway Setup App

Expand Down
71 changes: 38 additions & 33 deletions conf/routes
Expand Up @@ -2,40 +2,40 @@
# This file defines all application routes (Higher priority routes first)
# ~~~~

GET /oauth2/authorize @com.yetu.oauth2provider.controllers.OAuth2Auth.authorizeUser
POST /oauth2/access_token @com.yetu.oauth2provider.controllers.OAuth2Auth.accessToken
GET /oauth2/info @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.info
GET /oauth2/validate @com.yetu.oauth2provider.controllers.OAuth2Validation.validate
GET /oauth2/access_token_implicit @com.yetu.oauth2provider.controllers.OAuth2Auth.accessTokenImplicit
GET /oauth2/certs com.yetu.oauth2provider.controllers.Certificates.certificates
GET /oauth2/authorize @com.yetu.oauth2provider.controllers.OAuth2Auth.authorizeUser
POST /oauth2/access_token @com.yetu.oauth2provider.controllers.OAuth2Auth.accessToken
GET /oauth2/info @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.info
GET /oauth2/validate @com.yetu.oauth2provider.controllers.OAuth2Validation.validate
GET /oauth2/access_token_implicit @com.yetu.oauth2provider.controllers.OAuth2Auth.accessTokenImplicit
GET /oauth2/certs com.yetu.oauth2provider.controllers.Certificates.certificates


## Cors Access-Control-Allow-Headers
OPTIONS /*all com.yetu.oauth2resource.controllers.CrossOrigin.preflight(all: String)
OPTIONS /*all com.yetu.oauth2resource.controllers.CrossOrigin.preflight(all: String)

POST /profile @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.updateUserProfile
POST /profile @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.updateUserProfile

POST /keys @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.updateKey
GET /keys @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.viewKeys
POST /keys @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.updateKey
GET /keys @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.viewKeys

#### permissions ####
POST /permissions @com.yetu.oauth2provider.controllers.OAuth2Auth.permissionsPost
POST /permissions @com.yetu.oauth2provider.controllers.OAuth2Auth.permissionsPost
####



# Home page
GET / @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.index
GET / @com.yetu.oauth2provider.controllers.OAuth2ResourceServer.index

# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
GET /assets/*file controllers.Assets.at(path="/public", file)


# Health Check
GET /health com.yetu.oauth2provider.controllers.HealthCheck.check
GET /health com.yetu.oauth2provider.controllers.HealthCheck.check


GET /trustedEntity/profile @com.yetu.oauth2provider.controllers.OAuth2TrustedServer.getUserProfile
GET /trustedEntity/profile @com.yetu.oauth2provider.controllers.OAuth2TrustedServer.getUserProfile



Expand All @@ -45,40 +45,45 @@ GET /trustedEntity/profile @com.yetu.oauth2provider.contr


# Login page
GET /login @com.yetu.oauth2provider.controllers.authentication.LoginPage.login
GET /logout @com.yetu.oauth2provider.controllers.authentication.LoginPage.logout
GET /login @com.yetu.oauth2provider.controllers.authentication.LoginPage.login
GET /logout @com.yetu.oauth2provider.controllers.authentication.LoginPage.logout

# Registration routes
GET /signup @com.yetu.oauth2provider.controllers.authentication.Registration.startSignUp
POST /signup @com.yetu.oauth2provider.controllers.authentication.Registration.handleStartSignUp
GET /signup/:mailToken @com.yetu.oauth2provider.controllers.authentication.Registration.signUp(mailToken)
POST /signup/:mailToken @com.yetu.oauth2provider.controllers.authentication.Registration.handleSignUp(mailToken)
GET /signup @com.yetu.oauth2provider.controllers.authentication.Registration.startSignUp
POST /signup @com.yetu.oauth2provider.controllers.authentication.Registration.handleStartSignUp
GET /signup/:mailToken @com.yetu.oauth2provider.controllers.authentication.Registration.signUp(mailToken)
POST /signup/:mailToken @com.yetu.oauth2provider.controllers.authentication.Registration.handleSignUp(mailToken)

# Reset password
GET /reset @com.yetu.oauth2provider.controllers.authentication.PasswordReset.startResetPassword
POST /reset @com.yetu.oauth2provider.controllers.authentication.PasswordReset.handleStartResetPassword
GET /reset/:mailToken @com.yetu.oauth2provider.controllers.authentication.PasswordReset.resetPassword(mailToken)
POST /reset/:mailToken @com.yetu.oauth2provider.controllers.authentication.PasswordReset.handleResetPassword(mailToken)
GET /reset @com.yetu.oauth2provider.controllers.authentication.PasswordReset.startResetPassword
POST /reset @com.yetu.oauth2provider.controllers.authentication.PasswordReset.handleStartResetPassword
GET /reset/:mailToken @com.yetu.oauth2provider.controllers.authentication.PasswordReset.resetPassword(mailToken)
POST /reset/:mailToken @com.yetu.oauth2provider.controllers.authentication.PasswordReset.handleResetPassword(mailToken)

# Change Password
GET /password @com.yetu.oauth2provider.controllers.authentication.PasswordChange.page
POST /password @com.yetu.oauth2provider.controllers.authentication.PasswordChange.handlePasswordChange
GET /password @com.yetu.oauth2provider.controllers.authentication.PasswordChange.page
POST /password @com.yetu.oauth2provider.controllers.authentication.PasswordChange.handlePasswordChange


# Authentication entry points for all providers
GET /authenticate/:provider @com.yetu.oauth2provider.controllers.authentication.ProviderController.authenticate(provider, redirectTo: Option[String])
POST /authenticate/:provider @com.yetu.oauth2provider.controllers.authentication.ProviderController.authenticateByPost(provider, redirectTo: Option[String])
GET /authenticate/:provider @com.yetu.oauth2provider.controllers.authentication.ProviderController.authenticate(provider, redirectTo: Option[String])
POST /authenticate/:provider @com.yetu.oauth2provider.controllers.authentication.ProviderController.authenticateByPost(provider, redirectTo: Option[String])


POST /api/authenticate/:provider @com.yetu.oauth2provider.controllers.authentication.LoginApi.authenticate(provider, builder = "token")
POST /api/authenticate/:provider @com.yetu.oauth2provider.controllers.authentication.LoginApi.authenticate(provider, builder = "token")

#####################
## setup ####
#####################


# New registration page
GET /setup/registration com.yetu.oauth2provider.controllers.setup.SetupPage.registration
GET /setup/registration com.yetu.oauth2provider.controllers.setup.SetupPage.registration

# New confirm mail page
GET /setup/confirmmail com.yetu.oauth2provider.controllers.setup.SetupPage.confirmmail

# New confirm mail page
GET /setup/confirmedmail com.yetu.oauth2provider.controllers.setup.SetupPage.confirmedmail

# Download setup app
GET /setup/download com.yetu.oauth2provider.controllers.setup.SetupPage.download
GET /setup/download com.yetu.oauth2provider.controllers.setup.SetupPage.download
23 changes: 23 additions & 0 deletions public/stylesheets/confirmedmail.css
@@ -0,0 +1,23 @@

.full{
display: block;
padding: 10% 0;
}
.full__container{
margin: 0 25%;
width: 50%;
}
.full__icon{
width: 15%;
height: 60px;
float:left;
}
.full__content{
width: 80%;
margin-left: 20%;
}
.full__button{
margin: 10% 40%;
width: 5%;
clear: both;
}
13 changes: 13 additions & 0 deletions public/stylesheets/confirmmail.css
@@ -0,0 +1,13 @@
.left{
width: 35%;
padding: 5%;
}
.left__img{
width: 100%;
height: 300px;
}
.right{
padding: 5% 0 5% 5%;
margin-left: 40%;
width: 55%;
}

0 comments on commit 07daee4

Please sign in to comment.