OAuthRequest

class OAuthRequest


The OAuth request to be sent to the server to start the OAuth 2 authentication flow.

Summary

Nested types

Builder for constructing new instance of OAuth request.

Constants

const String

The default google-specific custom URL to route the response from the auth server back to the 1P companion app, which then forwards it to the 3P app that made the request on the wear device.

const String

The default google-specific custom URL in China to route the response from the auth server back to the 1P companion app, which then forwards it to the 3P app that made the request on the wear device.

Public properties

String

The package name of the app sending the auth request.

String

The redirect url the companion app is registered to.

Uri

The Url of the auth request.

Constants

WEAR_REDIRECT_URL_PREFIX

const val WEAR_REDIRECT_URL_PREFIXString

The default google-specific custom URL to route the response from the auth server back to the 1P companion app, which then forwards it to the 3P app that made the request on the wear device.

WEAR_REDIRECT_URL_PREFIX_CN

const val WEAR_REDIRECT_URL_PREFIX_CNString

The default google-specific custom URL in China to route the response from the auth server back to the 1P companion app, which then forwards it to the 3P app that made the request on the wear device.

Public properties

packageName

Added in 1.0.0
val packageNameString

The package name of the app sending the auth request.

redirectUrl

Added in 1.1.0-alpha04
val redirectUrlString

The redirect url the companion app is registered to. If it doesn't exist, an empty string will be returned.

requestUrl

Added in 1.0.0
val requestUrlUri

The Url of the auth request.

The request is expected to create a URL with the following format:

    https://authorization-server.com/auth?client_id=XXXXX
&redirect_uri=https://wear.googleapis.com/3p_auth/mypackagename
&response_type=code
&code_challenge=XXXXX...XXX
&code_challenge_method=S256