Releases: toolsplus/atlassian-connect-play
0.1.3
0.1.2
0.1.1
Added JwtResponseHelper
trait to make it easier to sign Play responses with refreshed self-authenticated JWTs. For simplicity you might want to add a ConfiguredJwtResponseHelper
to your project to adjust the helper to your needs
Example of a ConfiguredJwtResponseHelper
that logs failed token generation:
trait ConfiguredJwtResponseHelper
extends JwtResponseHelper
with ResponseHelpers {
protected def logger: HostContextLogger
import io.toolsplus.atlassian.connect.play.api.models.AtlassianHostUser.Implicits._
def withJwtHeader(result: Result)(
implicit hostUser: AtlassianHostUser): Result = {
withJwtResponseHeader(result) match {
case Right(signedResult) => signedResult
case Left(error) =>
logger.error(
s"Failed to generate self-authenticated JWT: ${error.getMessage}")
internalServerError("Failed to generate self-authenticated JWT")
}
}
}
0.1.0
With this release we migrate to Scala 2.12 and Play 2.6. There are no new features added.
At this point in time I don't intend to further maintain a 2.11 release with Play 2.5. If anyone is dependent on 2.11 and/or Play 2.5 it shouldn't be difficult to maintain a 2.5.x branch for a while.
Major changes
- Refactor
JwtAuthenticatedActions
toAtlassianHostUserAction
andOptionalAtlassianHostUserAction
- Update config key
play.crypto.sceret
to new keyplay.http.secret.key
(change in Play 2.6)
Migration guide
JwtAuthenticatedActions
With JwtAuthenticatedActions
split into AtlassianHostUserAction
and OptionalAtlassianHostUserAction
you will have to inject those two dependencies into your controllers instead of an instance of JwtAuthenticatedActions
.
atlassianHostUserAction: AtlassianHostUserAction,
optionalAtlassianHostUserAction: OptionalAtlassianHostUserAction,
Also replace the import of implicit conversions with the respective implicit import:
import atlassianHostUserAction.Implicits._
import optionalAtlassianHostUserAction.Implicits._
These actions can then be used as follows:
def installed = {
optionalAtlassianHostUserAction.async(circe.json[InstalledEvent]) {
...
Update configuration key play.crypto.sceret
The configuration key should be changed to play.http.secret.key
. The old one still works but is deprecated by Play.
Configure Play default filter
Play 2.6 now has some default filters enabled by default. You might need to configure these filters if you did not use them before. See the migration guide for details: https://www.playframework.com/documentation/2.6.x/Migration26#Default-Filters
0.0.3
-
Split add-on properties into
AddonProperties
andAtlassianConnect
properties. Add-on properties will most likely be overridden by an add-on to specify add-on key and other properties. Atlassian Connect properties contain framework specific configuration, such as JWT expiry time etc. These parameters are less likely to be overridden by add-ons. -
Add
AtlassianConnectHttpClient
to make authenticated request to the Atlassian host product (authenticated as add-on using JWT).