CI / Build and push docker image (push) Successful in 2m9s
GET /api/me now carries the profile picture URL when the provider supplies an absolute http(s) one; the SPA shows it in the lobby navbar and draws a deterministic identicon from the sub otherwise, falling back to the identicon when the image fails to load. The identicon is a 5x5 mirrored grid seeded by an inline FNV-1a hash so it stays stable across Rust versions and is unit-testable on the host. The dev mock IdP hands alice and bob a picture claim.
58 lines
1.3 KiB
JSON
58 lines
1.3 KiB
JSON
{
|
|
"interactiveLogin": true,
|
|
"tokenCallbacks": [
|
|
{
|
|
"issuerId": "tavolo",
|
|
"tokenExpiry": 3600,
|
|
"requestMappings": [
|
|
{
|
|
"requestParam": "subject",
|
|
"match": "alice",
|
|
"claims": {
|
|
"sub": "alice",
|
|
"preferred_username": "alice",
|
|
"name": "Alice",
|
|
"picture": "https://i.pravatar.cc/128?u=alice"
|
|
}
|
|
},
|
|
{
|
|
"requestParam": "subject",
|
|
"match": "bob",
|
|
"claims": {
|
|
"sub": "bob",
|
|
"preferred_username": "bob",
|
|
"name": "Bob",
|
|
"picture": "https://i.pravatar.cc/128?u=bob"
|
|
}
|
|
},
|
|
{
|
|
"requestParam": "subject",
|
|
"match": "carol",
|
|
"claims": {
|
|
"sub": "carol",
|
|
"preferred_username": "carol",
|
|
"name": "Carol"
|
|
}
|
|
},
|
|
{
|
|
"requestParam": "subject",
|
|
"match": "dave",
|
|
"claims": {
|
|
"sub": "dave",
|
|
"preferred_username": "dave",
|
|
"name": "Dave"
|
|
}
|
|
},
|
|
{
|
|
"requestParam": "subject",
|
|
"match": ".*",
|
|
"claims": {
|
|
"sub": "${subject}",
|
|
"preferred_username": "${subject}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|