fmewebservices.FMEOAuthV2Connection
Clears all values associated with this connection. |
|
Retrieves the access token associated with this connection. |
|
Returns a header field containing the access token. |
|
Returns a URI query string containing the access token. |
|
Gets the database generated id for this connection. |
|
Retrieves the key values associated with this connection. |
|
Retrieves the name of this named connection, which is unique for the given authorized users. |
|
Gets the owner (user) of this named connection. |
|
Retrieves the refresh token associated with this connection. |
|
Gets the owner (user) of this named connection. |
|
Retrieves the type of the named connection. |
|
Returns whether or not this named connection should verify ssl certificates. |
|
Return the associated web service. |
|
|
Sets the access token associated with this connection. |
|
Sets the expiry time associated with the access token. |
Sets the database generated id for this connection. |
|
|
Sets the key values associated with this connection. |
Sets the name of this named connection, which is not committed to the DB until this named connection is passed back to the manager. |
|
Sets the owner (user) of this named connection. |
|
Sets the refresh token associated with this connection. |
|
This information is NOT persistent. |
- class FMEOAuthV2Connection
FME OAuth Connection class.
init(serviceName)
Create an instance of an oauth connection object.
- Parameters:
serviceName (str) – The service name of the connection.
- __init__(*args, **kwargs)
- getAccessToken()
Retrieves the access token associated with this connection.
- Return type:
- Returns:
The access token.
- getAuthorizationHeader()
Returns a header field containing the access token.
- Return type:
- Returns:
A tuple in the form (header, authCode).
- Raises:
FMEWSException – An exception is raised if an error occurred.
- getAuthorizationQueryString()
Returns a URI query string containing the access token.
- Return type:
- Returns:
A tuple in the form (queryKey, queryValue).
- Raises:
FMEWSException – An exception is raised if an error occurred.
- getId()
Gets the database generated id for this connection.
- Return type:
- Returns:
The database generated id for the named connection.
- getKeyValues()
Retrieves the key values associated with this connection.
- Return type:
- Returns:
The key values for this connection as a dictionary.
- getName()
Retrieves the name of this named connection, which is unique for the given authorized users. This is the name given to the connection by the user.
- Return type:
- Returns:
The name of the named connection.
- getOwnerName()
Gets the owner (user) of this named connection.
- Return type:
- Returns:
The owner of the named connection.
- getRefreshToken()
Retrieves the refresh token associated with this connection.
- Return type:
- Returns:
The refresh token.
- getServiceName()
Gets the owner (user) of this named connection.
- Return type:
- Returns:
The owner of the named connection.
- getType()
Retrieves the type of the named connection.
Returns one of
FME_NAMEDCONNECTION_DATABASE
,FME_NAMEDCONNECTION_BASIC
,FME_NAMEDCONNECTION_OAUTH
,FME_NAMEDCONNECTION_TOKEN
, orFME_NAMEDCONNECTION_WEBSERVICE
.- Return type:
- Returns:
The type of the named connection.
- getVerifySslCertificate()
Returns whether or not this named connection should verify ssl certificates.
- Return type:
- Returns:
Whether or not this named connection should verify ssl certificates.
- getWebService()
Return the associated web service.
- Return type:
- Returns:
The associated web service.
- setAccessToken(accessToken)
Sets the access token associated with this connection. Not committed until this named connection is passed back to the manager.
- setExpiryTime(utcUnixTime)
Sets the expiry time associated with the access token. The value is assumed to be in seconds since epoch, UTC. Not committed until this named connection is passed back to the manager.
- Parameters:
utcUnixTime (
long
) – The expiry time.- Return type:
- setId(name)
Sets the database generated id for this connection.
- setKeyValues(keyValues)
Sets the key values associated with this connection. This will append new keys, update existing values and will not delete existing values. The keys are the dictionary keys and the values are the dictionary values in the
dict
parameter.- Parameters:
keyValues (
dict
) – The key values.- Return type:
- Raises:
FMEWSException – An exception is raised if an error occurred.
- setName(name)
Sets the name of this named connection, which is not committed to the DB until this named connection is passed back to the manager.
- setOwnerName(name)
Sets the owner (user) of this named connection.
- setRefreshToken(refreshToken)
Sets the refresh token associated with this connection. Not committed until this named connection is passed back to the manager.