Skip to content

Support JWT authentication #49

@ianpartridge

Description

@ianpartridge

Question:

Kitura and KituraKit: Is there a way to use JSON Web Token (JWT) when you use KituraKit to send
HTTP requests to a Kitura server?

Answer from @djones6:

As far as I'm aware, KituraKit doesn't support JWT authentication yet, but it does have the ability to send other bearer token types.

I think it should be possible to add your own support for authenticating with a JWT by replicating the code for the other token types. If you get this working, you'd be welcome to submit a pull request!

You'd need some additional code though if you wanted to support a login route that issued a token. @andrew Lees wrote a great blog post that covers that topic: https://developer.ibm.com/swift/2018/12/18/swift-jwt-3-0-codable-json-web-tokens/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions