Rest.OAuth2Proxy¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
AccessToken |
||
r/w |
AuthUrl |
||
r/w |
ClientId |
||
r/w |
ClientSecret |
||
r/w |
ExpirationDate |
||
r/w |
RedirectUri |
||
r/w |
RefreshToken |
||
r/w |
TokenUrl |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Rest.OAuth2Proxy(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(authurl, tokenurl, redirecturl, client_id, client_secret, baseurl)¶
- Parameters:
- Returns:
a newly created
Rest.OAuth2Proxy
- Return type:
Create a new
Rest.OAuth2Proxy
.
- build_authorization_url(code_challenge, scope)¶
- Parameters:
code_challenge (
str
) – the code challenge (seeRest.PkceCodeChallenge
)
- Returns:
the authorization url which should be shown in a WebView in order to accept/decline the request to authorize the application
- state:
a CRSF token which should be verified from the redirect_uri
- Return type:
New in version 0.8.
- fetch_access_token_async(authorization_code, code_verifier, cancellable, callback, *user_data)¶
- Parameters:
authorization_code (
str
) –code_verifier (
str
) –cancellable (
Gio.Cancellable
orNone
) –callback (
Gio.AsyncReadyCallback
orNone
) –
- fetch_access_token_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
provided to callback- Raises:
- Return type:
- get_expiration_date()¶
- Return type:
- refresh_access_token()¶
- Raises:
- Return type:
- refresh_access_token_async(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) –callback (
Gio.AsyncReadyCallback
orNone
) –
- refresh_access_token_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
provided to callback- Raises:
- Return type:
- set_expiration_date(expiration_date)¶
- Parameters:
expiration_date (
GLib.DateTime
) –
- do_parse_access_token(payload, task) virtual¶
- Parameters:
payload (
GLib.Bytes
) –task (
Gio.Task
) –
Property Details¶
- Rest.OAuth2Proxy.props.access_token¶
-
AccessToken
- Rest.OAuth2Proxy.props.auth_url¶
-
AuthUrl
- Rest.OAuth2Proxy.props.client_id¶
-
ClientId
- Rest.OAuth2Proxy.props.client_secret¶
-
ClientSecret
- Rest.OAuth2Proxy.props.expiration_date¶
- Name:
expiration-date
- Type:
- Default Value:
- Flags:
ExpirationDate
- Rest.OAuth2Proxy.props.redirect_uri¶
-
RedirectUri
- Rest.OAuth2Proxy.props.refresh_token¶
-
RefreshToken