Skip to content
Ravi Teja Gudapati edited this page Jan 16, 2018 · 3 revisions

Configuring HTTPS with Jaguar is very simple.

Given certificate and private key in PEM format, a SecurityContext can be created as follows:

  // Create SecurityContext from certificate and private key
  final security = new SecurityContext()
    ..useCertificateChain("bin/ssl/certificate.pem")
    ..usePrivateKey("bin/ssl/keys.pem");

useCertificateChain and usePrivateKey methods load certificate and private key from the path provided.

NOTE: If you don't have a certificate already, learn how to create a self signed certificate or acquire certificate from letsencrypt.

Jaguar constructor accepts security configuration through parameter securityContext.

final server = new Jaguar(securityContext: security);

Example

  1. Example showing how to configure HTTPS with Jaguar.

What's next?

In the next article, learn how to configure CORS using Jaguar.

Basics

Serialization

Forms

Sessions

Authentication

  • Basic authentication
  • Form authentication
  • JSON authentication
  • Authorization
  • OAuth

Database

Security

Real time

  • Server sent events (SSE)
  • Websockets

Deployment

  • systemd
  • Docker
  • AppEngine

API Documentation

Clone this wiki locally