/
README
47 lines (36 loc) · 1.41 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Provides a class which can provide decoded keys to client applications.
These keys may be useful for OAuth2 sign-on process flows, for example.
Note that this does NOT provide security; it exists to separate the
provision of encoded keys from client application code. The static
stored keys should be provided as:
/usr/share/libsailfishkeyprovider/storedkeys.ini
Example of usage:
@
#include <sailfishkeyprovider.h>
char *buf = NULL;
int success = SailfishKeyProvider_storedKey(
"twitter",
"twitter-sync",
"consumer_key",
&buf);
/* use key in OAuth2 flow */
free(buf);
@
Parameters are:
- provider name (from /usr/share/accounts/providers/ description file)
- service name (from /usr/share/accounts/services/ description file)
- key name (required for OAuth2 flow)
===================
GENERATING NEW KEYS
===================
For your added convenience of not having to edit and recompile unit tests
just to generate some encrypted keys, this now builds an utility:
$ sailfish-keyprovider-keygen xor Secret ClientID
^ ^ ^
/ \ \
method encryption \
key value to be obfuscated
generate_keys:
input: ClientID
encoded: 0 EAkKFwsAGiE=
roundtrip: 0 ClientID