ConnectionStringAuthentication Class
ConnectionString class that can be used with msrest to provide SasToken authentication
- Inheritance
-
ConnectionStringAuthenticationmsrest.authentication.AuthenticationConnectionStringAuthentication
Constructor
ConnectionStringAuthentication(connection_string)
Parameters
Name | Description |
---|---|
connection_string
Required
|
The connection string to generate SasToken with |
Methods
create_with_parsed_values | |
get |
Return the value for key if key is in the dictionary, else default |
signed_session |
Create requests session with any required auth headers applied. If a session object is provided, configure it directly. Otherwise, create a new session and return it. |
create_with_parsed_values
create_with_parsed_values(host_name, shared_access_key_name, shared_access_key)
Parameters
Name | Description |
---|---|
host_name
Required
|
|
shared_access_key_name
Required
|
|
shared_access_key
Required
|
|
get
Return the value for key if key is in the dictionary, else default
get(key, default=None)
Parameters
Name | Description |
---|---|
key
Required
|
The key to retrieve a value for |
default
|
The default value returned if a key is not found Default value: None
|
Returns
Type | Description |
---|---|
The value for the given key |
signed_session
Create requests session with any required auth headers applied.
If a session object is provided, configure it directly. Otherwise, create a new session and return it.
signed_session(session=None)
Parameters
Name | Description |
---|---|
session
|
<xref:requests.Session>
The session to configure for authentication Default value: None
|
Returns
Type | Description |
---|---|
<xref:requests.Session>
|
Attributes
header
header = 'Authorization'
Azure SDK for Python