aboutsummaryrefslogtreecommitdiff
path: root/lib/Net/Hawk/Server.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Net/Hawk/Server.pm')
-rw-r--r--lib/Net/Hawk/Server.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Net/Hawk/Server.pm b/lib/Net/Hawk/Server.pm
new file mode 100644
index 0000000..1b39352
--- /dev/null
+++ b/lib/Net/Hawk/Server.pm
@@ -0,0 +1,18 @@
+package Net::Hawk::Server {
+ use v6;
+
+ our sub authenticate(
+ %request!,
+ &credentialsFunc:($,&)!,
+ %whatever!,
+ &callback:($,%,%)!,
+ ) {
+ my %creds;
+ &credentialsFunc.('some id', sub ($err,%credentials) { %creds = %credentials });
+ %request<url> ~~ m{'bewit=' $<ext>=(.*?) ['&'|$]};
+ my %attributes = (
+ ext => $/<ext>;
+ );
+ &callback.(Nil,%creds,%attributes);
+ };
+};