The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tivoli::AccessManager::Admin::SSO::Web

SYNOPSIS

    use Tivoli::AccessManager::Admin;

    my $pd = Tivoli::AccessManager::Admin->new( password => $pswd);
    my $sso = Tivoli::AccessManager::Admin::SSO::Web->new( $pd, name => 'twiki' );
    my $resp;

    # See what web GSO resources exist
    $resp = Tivoli::AccessManager::Admin::SSO::Web->list($pd);
    print join("\n", $resp->value);
    
    # Create the web SSO resource if it doesn't exist
    $sso = Tivoli::AccessManager::Admin::SSO::Web->new($pd) unless $sso->exist;

    my $name = $sso->name;
    my $desc = $sso->description

    $resp = $sso->delete;

DESCRIPTION

Tivoli::AccessManager::Admin::SSO::Web provides the interface to create and manage web GSO resources.

CONSTRUCTOR

new(PDADMIN[, name => STRING, description => STRING])

Creates a blessed Tivoli::AccessManager::Admin::SSO::Web object and returns it.

Parameters

PDADMIN

An initialized Tivoli::AccessManager::Admin::Context object. As with every other class, the only way to change the context is to destroy the Tivoli::AccessManager::Admin::SSO::Web object and recreate it with the new context. This parameter is required.

name => STRING

The name of the SSO web resource. If this is the only other parameter provided, you do not need to use a named parameter. I.e., new($pd,"name") will assume "name" is the name of the resource. This parameter is optional.

description => STRING

A description of the resource. This is an optional parameter.

Returns

A blessed Tivoli::AccessManager::Admin::SSO::Web object if things worked. undef will be returned otherwise, along with a nasty warning to STDERR.

create(PDADMIN, <NAME|name => name, description => STRING>)

Creates a new web GSO resource.

Parameters

PDADMIN

An initialized Tivoli::AccessManager::Admin::Context object. As with every other class, the only way to change the context is to destroy the Tivoli::AccessManager::Admin::SSO::Web object and recreate it with the new context. This parameter is required.

NAME

If only one parameter provided other than PDADMIN is provided, it will be interpreted as the name of the GSO web resource. You must provide the name of the resource to create -- either this way or the next way.

name => NAME

An alternate way to provide the reource's name.

description => STRING

Provide a description for the GSO resource. The only way to provide this to create is to use the full named parameter call. It is an optional parameter.

I should also note that this is the only way to set the description -- the API provides no way to change the description after the resource is created.

Returns

A Tivoli::AccessManager::Admin::Response object, containing the Tivoli::AccessManager::Admin::SSO::Web object if the create was successful. Otherwise you will get an error message.

CLASS METHODS

The standard disclaimer. All the class methods will return a Tivoli::AccessManager::Admin::Response object unless specifically stated otherwise. See the documentation for that module on how to coax the values out.

list

Lists all the defined web resources.

Parameters

None.

Returns

A list of the defined web GSO resources.

METHODS

The standard disclaimer. All the methods will return a Tivoli::AccessManager::Admin::Response object unless specifically stated otherwise. See the documentation for that module on how to coax the values out.

The methods also follow the same basic pattern. If an optional parameter is provided, it will have the affect of setting the attribute. All method calls will embed the results of a 'get' in the Tivoli::AccessManager::Admin::Response object.

create( [NAME|name => NAME[, description => STRING]] )

As you might expect, create can also be used as a method call.

Parameters

NAME

The name of the resource. This is only required if you did not provide the name of the resource when you created the object and if you are not using the named parameter call.

If you provide the name to both "new" and "create", the name given to "create" will be the one used.

name => NAME

An alternate way to provide the name of the resource. If you want to provide a description of the resource, you must use this form.

description => STRING

A description of the resource. This is optional. If you provide a description to both "new" and "create", the description given to "create" will be the one used.

I should also note that this is the only way to set the description -- the API provides no way to change the description after the resource is created.

Returns

The success or failure of the operation.

delete

Deletes the web resource.

Parameters

None.

Returns

The success of failure of the operation.

list

As should be no surprise, "list" can be used as an instance method as well. I don't think it makes any sense, but you can do it.

Parameters

None

Returns

A list of the defined web GSO resources.

name

Gets the name of the web resource.

Parameters

None.

Returns

The name of the resource. This is returned as a string -- it is not embedded in an Tivoli::AccessManager::Admin::Response object.

description

Gets the web resource's description, if set.

Parameters

None.

Returns

The resource's description, if set. This is returned as a string -- it is not embedded in an Tivoli::AccessManager::Admin::Response object. You will get an empty string if the description is not set.

exist

Determines if the web resource object exists.

Parameters

None.

Returns

True if the resource exists, false otherwise. Again, this is not embedded in an Tivoli::AccessManager::Admin::Response object.

ACKNOWLEDGEMENTS

See Tivoli::AccessManager::Admin for the list. This was not possible without the help of a bunch of people smarter than I.

BUGS

None known.

AUTHOR

Mik Firestone <mikfire@gmail.com>

COPYRIGHT

Copyright (c) 2006-2013 Mik Firestone. All rights reserved. This program is free software; you can redistibute it and/or modify it under the same terms as Perl itself.

All references to TAM, Tivoli Access Manager, etc are copyrighted, trademarked and otherwise patented by IBM.