stormpath / Turnstile

An authentication framework for Swift.
Apache License 2.0
165 stars 29 forks source link

Credentials #32

Closed nikitabelopotapov closed 7 years ago

nikitabelopotapov commented 7 years ago

How can i implement my own class inheriting Credentials? Always gets UnsupportedCredentialsError with login/register methods

I tried to inherit from UsernamePassword - that worked, but i had to make some changes in this class.

is there any good way implementing own Credentials?

edjiang commented 7 years ago

Yeah, you can implement your own credentials -- it's just that the pre-implemented Realms don't support custom credentials. You'll need to write a Realm that supports you credentials using these instructions:

https://github.com/stormpath/Turnstile#realm