Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated documentation from smtp -> play.mailer #603

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ lazy val javaDemo = project.in( file("samples/java/demo") ).enablePlugins(PlayJa
lazy val root = project.in( file(".") ).aggregate(core, scalaDemo, javaDemo) .settings(
aggregate in update := false
)

// skip javadoc
// https://www.scala-sbt.org/sbt-native-packager/formats/universal.html
mappings in (Compile, packageDoc) := Seq()
sources in (Compile, doc) := Seq()
publishArtifact in (Compile, packageDoc) := false
12 changes: 8 additions & 4 deletions docs/src/manual/source/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ Create a `securesocial.conf` file within your app's conf directory and include i

If you plan to use the `UsernamePasswordProvider` you need to configure your mail service. SecureSocial uses the [mailer plugin](https://github.com/typesafehub/play-plugins/tree/master/mailer) from Typesafe.

These settings go in the `smtp` section of the `securesocial.conf` file:
These settings go in the `play.mailer` section of the `application.conf` file:

:::bash
smtp {
host=smtp.gmail.com
play.mailer {
host="smtp.gmail.com"
#port=25
ssl=true
tls=yes
user="your_user"
password=your_password
password="your_password"
from="your_from_address"
debug=no
timeout=60
connectiontimeout=60
}

## Global Settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@ <h1>@Messages("securesocial.password.title")</h1>

<form action="@env.routes.handleResetPasswordUrl(mailToken)"
class="form-horizontal"
autocomplete="off"
method="POST"
>
<fieldset>
@CSRF.formField
@helper.inputPassword(
resetForm("password.password1"),
'_label -> Messages("securesocial.signup.password1"),
'class -> "input-xlarge"
'class -> "form-control"
)

@helper.inputPassword(
resetForm("password.password2"),
'_label -> Messages("securesocial.signup.password2"),
'_error -> resetForm.error("password"),
'class -> "input-xlarge"
'class -> "form-control"
)

<div class="form-actions">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ <h1>@Messages("securesocial.signup.title")</h1>

<form action="@env.routes.handleSignUpUrl(mailToken)"
class="form-horizontal"
autocomplete= "off"
method="POST"
>
<fieldset>
Expand All @@ -24,33 +23,33 @@ <h1>@Messages("securesocial.signup.title")</h1>
@helper.inputText(
signUpForm("userName"),
'_label -> Messages("securesocial.signup.username"),
'class -> "input-xlarge"
'class -> "form-control"
)
}

@helper.inputText(
signUpForm("firstName"),
'_label -> Messages("securesocial.signup.firstName"),
'class -> "input-xlarge"
'class -> "form-control"
)

@helper.inputText(
signUpForm("lastName"),
'_label -> Messages("securesocial.signup.lastName"),
'class -> "input-xlarge"
'class -> "form-control"
)

@helper.inputPassword(
signUpForm("password.password1"),
'_label -> Messages("securesocial.signup.password1"),
'class -> "input-xlarge"
'class -> "form-control"
)

@helper.inputPassword(
signUpForm("password.password2"),
'_label -> Messages("securesocial.signup.password2"),
'_error -> signUpForm.error("password"),
'class -> "input-xlarge"
'class -> "form-control"
)

<div class="form-actions">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ <h1>@Messages("securesocial.password.title")</h1>

<form action="@env.routes.handleStartResetPasswordUrl"
class="form-horizontal"
autocomplete="off"
method="POST"
>
<fieldset>
@CSRF.formField
@helper.inputText(
startForm("email"),
'_label -> Messages("securesocial.signup.email1"),
'class -> "input-xlarge"
'class -> "form-control"
)

<div class="form-actions">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ <h1>@Messages("securesocial.signup.title")</h1>

<form action="@env.routes.handleStartSignUpUrl"
class="form-horizontal"
autocomplete="off" method="post"
method="post"
>
<fieldset>
@CSRF.formField
@helper.inputText(
startForm("email"),
'_label -> Messages("securesocial.signup.email1"),
'class -> "input-xlarge"
'class -> "form-control"
)

<div class="form-actions">
Expand Down
4 changes: 4 additions & 0 deletions module-code/app/securesocial/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<html>
<head>
<title>@title</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<link rel="stylesheet" media="screen" href="@env.routes.bootstrapCssPath">
<link rel="shortcut icon" type="image/png" href="@env.routes.faviconPath">
@env.routes.customCssPath.map { customPath =>
Expand Down
4 changes: 1 addition & 3 deletions module-code/app/securesocial/views/passwordChange.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ <h1>@Messages("securesocial.passwordChange.title")</h1>
} else {
<form action="@env.routes.passwordChangeUrl"
class="form-horizontal"
autocomplete= "off"
method="POST"
>
method="POST">
<fieldset>
@CSRF.formField
@helper.inputPassword(
Expand Down
18 changes: 8 additions & 10 deletions module-code/app/securesocial/views/provider.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,39 @@

@if( provider.authMethod == UserPassword ) {
<form action = "@env.routes.authenticationUrl("userpass")"
class="form-horizontal" autocomplete="off" method="POST">
class="form-horizontal" method="POST">
<fieldset>
@CSRF.formField

@if( env.usernamePasswordConfig.withUserNameSupport ) {
@helper.inputText(
loginForm.get("username"),
'_label -> Messages("securesocial.signup.username"),
'class -> "input-xlarge"
'class -> "form-control"
)
} else {
@helper.inputText(
loginForm.get("username"),
'_label -> Messages("securesocial.signup.email1"),
'class -> "input-xlarge"
'class -> "form-control"
)
}

@helper.inputPassword(
loginForm.get("password"),
'_label -> Messages("securesocial.signup.password1"),
'class -> "input-xlarge"
'class -> "form-control"
)

<div class="form-actions">
<button type="submit" class="btn btn-primary">@Messages("securesocial.login.title")</button>
</div>
<div class="clearfix">
<p><a href="@env.routes.startResetPasswordUrl">@Messages("securesocial.login.forgotPassword") </a></p>
</div>
<div class="clearfix" style="font-size: larger;">
<a href="@env.routes.startResetPasswordUrl">@Messages("securesocial.login.forgotPassword") </a>
@if(env.registrationEnabled.value){
<div class="clearfix">
<p>@Messages("securesocial.login.signUp") <a href="@env.routes.startSignUpUrl">@Messages("securesocial.login.here")</a></p>
</div>
@Messages("securesocial.login.signUp") <a href="@env.routes.startSignUpUrl">@Messages("securesocial.login.here")</a>
}
</div>
</fieldset>
</form>
}
Expand Down
2 changes: 1 addition & 1 deletion module-code/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.1.1
sbt.version=1.3.13
6 changes: 3 additions & 3 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

object Common {
def version = "master-SNAPSHOT"
def playVersion = System.getProperty("play.version", "2.6.12")
def scalaVersion = System.getProperty("scala.version", "2.12.6")
def crossScalaVersions = Seq(scalaVersion, "2.11.12")
def playVersion = System.getProperty("play.version", "2.6.25")
def scalaVersion = System.getProperty("scala.version", "2.12.12")
def crossScalaVersions = Nil
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.1.1
sbt.version=1.3.13
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ logLevel := Level.Warn
resolvers += Resolver.typesafeRepo("releases")

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % System.getProperty("play.version", "2.6.11"))
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % System.getProperty("play.version", "2.6.25"))

// Add Scalariform
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
Expand Down
2 changes: 1 addition & 1 deletion samples/java/demo/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.1.1
sbt.version=1.3.13
2 changes: 1 addition & 1 deletion samples/scala/demo/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.1.1
sbt.version=1.3.13