});
__PACKAGE__->register_method ({
- name => 'index',
- path => '',
+ name => 'index',
+ path => '',
method => 'GET',
description => "Directory index.",
- permissions => {
+ permissions => {
user => 'all',
},
parameters => {
},
code => sub {
my ($param) = @_;
-
+
my $res = [
{ subdir => 'ticket' },
{ subdir => 'password' },
__PACKAGE__->register_method ({
- name => 'get_ticket',
- path => 'ticket',
+ name => 'get_ticket',
+ path => 'ticket',
method => 'GET',
permissions => { user => 'world' },
description => "Dummy. Useful for formaters which want to priovde a login page.",
},
returns => { type => "null" },
code => sub { return undef; }});
-
+
__PACKAGE__->register_method ({
- name => 'create_ticket',
- path => 'ticket',
+ name => 'create_ticket',
+ path => 'ticket',
method => 'POST',
- permissions => {
+ permissions => {
description => "You need to pass valid credientials.",
- user => 'world'
+ user => 'world'
},
protected => 1, # else we can't access shadow files
description => "Create or verify authentication ticket.",
description => "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>\@<relam>.",
optional => 1,
}),
- password => {
+ password => {
description => "The secret password. This can also be a valid ticket.",
type => 'string',
},
}});
__PACKAGE__->register_method ({
- name => 'change_passsword',
- path => 'password',
+ name => 'change_passsword',
+ path => 'password',
method => 'PUT',
protected => 1, # else we can't access shadow files
permissions => {
additionalProperties => 0,
properties => {
userid => get_standard_option('userid'),
- password => {
+ password => {
description => "The new password.",
type => 'string',
- minLength => 5,
+ minLength => 5,
maxLength => 64,
},
}