webfinger endpoint
This commit is contained in:
parent
fa2f012261
commit
9ca72682b6
1 changed files with 24 additions and 0 deletions
24
src/routes/.well-known/webfinger/+server.ts
Normal file
24
src/routes/.well-known/webfinger/+server.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import type { RequestHandler } from './$types';
|
||||
|
||||
export const GET: RequestHandler = ({ url }) => {
|
||||
const resource = url.searchParams.get('resource');
|
||||
const issuer = "https://auth.satr14.my.id";
|
||||
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
subject: resource,
|
||||
links: [
|
||||
{
|
||||
rel: 'http://openid.net/specs/connect/1.0/issuer',
|
||||
href: issuer
|
||||
}
|
||||
]
|
||||
}),
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/jrd+json',
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue