The resolver toolkit contains an Ant task to login to an AstroGrid Community service. Validating an Account identifier and password and returning a SecurityToken.
Before using the login tasks, check that the Account identifier has been set to point to a valid Community and Account.
See Resolver properties
The following Ant script fragment installs the password resolver task.
<taskdef name="login.task" classname="org.astrogrid.community.resolver.ant.CommunityPasswordResolverTask">
<classpath refid="resolver.classpath"/>
</taskdef>
The login.live Ant task uses a live Registry service to resolve the endpoint of a Community
service, and then calls the Community service to validate the Account identifier and password.
The following command will run the login task, using a live Registry service to resolve the Community service.
ant -f resolver.xml login.live
The following Ant script fragment calls the password resolver task, using a live Registry service to resolve the Community service.
<login.task
registry="${org.astrogrid.registry.url}"
account="${org.astrogrid.community.account}"
password="qwerty"
/>
If the login succeeds, then the task will print out a new security token value, returned from the Community service.
The task will also store the token value in an Ant property called org.astrogrid.community.token.
There are reported problems when using the local registry files on a Windows system.
The login.local Ant task uses local Registry files to resolve the endpoint of a Community
service, and then calls the Community service to validate the Account identifier and password.
The following command will run the login task, using local Registry files to resolve the Community service.
ant -f resolver.xml login.local
The following Ant script fragment calls the password resolver task, using local Registry properties to resolve the Community service.
<login.task
properties="${basedir}/config/registry.properties"
account="${org.astrogrid.community.account}"
password="qwerty"
/>
If the login succeeds, then the task will print out a new security token value, returned from the Community service.
The task will also store the token value in an Ant property called org.astrogrid.community.token.