AuthURLs

class pyvo.auth.AuthURLs[source]

Bases: object

AuthURLs helps determine which security method should be used with a given URL. It learns the security methods through the VOSI capabilities, which are passed in via update_from_capabilities.

Methods Summary

add_security_method_for_url(self, url, …) Add a security method for a url.
allowed_auth_methods(self, url) Return the authentication methods allowed for a particular URL.
update_from_capabilities(self, capabilities) Update the URL to security method mapping using the capabilities provided.

Methods Documentation

add_security_method_for_url(self, url, security_method, exact=False)[source]

Add a security method for a url. This is additive with update_from_capabilities. This can be useful to set additional security methods that aren’t set in the capabilities for whatever reason.

Parameters:
url : str

URL to set a security method for

security_method : str

URI of the security method to set

exact : bool

If True, match only this URL. If false, match all URLs that match this as a base URL.

allowed_auth_methods(self, url)[source]

Return the authentication methods allowed for a particular URL. The methods are returned as URIs that represent security methods.

Parameters:
url : str

the URL to determine authentication methods

update_from_capabilities(self, capabilities)[source]

Update the URL to security method mapping using the capabilities provided.

Parameters:
capabilities : object

List of Capabilities