1. 25 Dec, 2018 1 commit
  2. 23 Dec, 2018 5 commits
  3. 17 Nov, 2018 1 commit
  4. 14 Sep, 2018 2 commits
  5. 13 Sep, 2018 1 commit
  6. 12 Sep, 2018 2 commits
    • Nicholas Tsim's avatar
      8ba2ea31
    • Nicholas Tsim's avatar
      Add `provider` query parameter for `/auth` endpoint · 331f437b
      Nicholas Tsim authored
      This commit adds the `provider` query parameter to allow users to select
      the specific authentication provider they wish to use when authenticating
      through Staticman.
      
      This is useful in situations where the site repository is hosted on a
      different provider to the authentication provider. For example, if the
      site is hosted on GitHub, but the commenter wishes to sign in through
      GitLab. Consequently, this is a prerequisite to adding additional
      authentication providers in the future.
      331f437b
  7. 29 Aug, 2018 1 commit
  8. 12 Aug, 2018 2 commits
  9. 11 Aug, 2018 1 commit
  10. 10 Aug, 2018 1 commit
  11. 22 Jul, 2018 12 commits
  12. 21 Jul, 2018 1 commit
    • Nicholas Tsim's avatar
      Add new authentication handling for processing entries · 38cb8a01
      Nicholas Tsim authored
      This commit adds new handling for when entries are processed with the
      new `auth.required` config option set to true. Staticman will now check
      for an `auth-token` field (instead of a `github-token`) and use this to
      validate that the user is indeed authenticated already on either GitHub
      or GitLab.
      
      Backwards compatibility with the v2 API has been maintained but it should
      be analyzed if this is important as the code is somewhat messy as a result.
      38cb8a01
  13. 20 Jul, 2018 2 commits
  14. 19 Jul, 2018 3 commits
    • Nicholas Tsim's avatar
    • Nicholas Tsim's avatar
      Add `User` model to encapsulate user identities · d26005fd
      Nicholas Tsim authored
      This commit adds a `User` model to properly encapsulate what data should
      be exposed from the Staticman API and specifically narrow its scope.
      
      With the addition of the GitLab identity provider, we need to be conscious
      that the GitLab user data structure will not be the same as the GitHub
      user (or any future identity provider's user model). This could be
      problematic as:
      
      1. We could expose private user data unintentionally.
      2. Staticman consumers will be able too much access to the internal user
         API meaning they could become too reliant on parts that we do not want
         to expose long term.
      d26005fd
    • Nicholas Tsim's avatar
      Update `/auth` endpoint to v3 implementation · 09c9bd8f
      Nicholas Tsim authored
      This commit adds additional handling for the GitLab OAuth flow. As part
      of this we require additional site config options:
      
      - `githubAuth.redirectUri`
      - `gitlabAuth.clientId`
      - `gitlabAuth.clientSecret`
      - `gitlabAuth.redirectUri`
      
      Notably, the `githubAuth` controller has also been renamed to `auth` to
      be more generic sounding.
      
      Additional changes include:
      - Various OAuth has been refactored and moved around (in general)
      - Factory method for instantiating GitLab/GitHub. This is mostly just to
        remove the boilerplate of writing `switch` statements in many places.
      09c9bd8f
  15. 18 Jul, 2018 5 commits