In Google Glass Application using GDK
GDK Authentication Process
not getting the UserToken
Warning: Do not store this user token. It is only for use by Google's authentication endpoints to map the request back to the originated user during that session only and does not contain any information that can be used to persistently identify the user. The token is not guaranteed to be the same if the user authenticates with the same Glassware multiple times or if the user authenticates with different Glassware from the same developer. The user enters their credentials on your authentication page.
Using thridparty Server Authentication At the time of Creating the Account from Mirror API
From where should i get the Parameter ? like 1. User token 2. AuthType 3. AuthToken 4. AccountName
what parameter should I send?
/**
* Creates an account and causes it to be synched up with the user's Glass.
* This example only supports one auth token; modify it if you need to add
* more than one, or to add features or user data or the password field.
*
* @param mirror the service returned by getMirrorService()
* @param userToken the user token sent to your auth callback URL
* @param accountName the account name for this particular user
* @param authTokenType the type of the auth token (chosen by you)
* @param authToken the auth token
*/
public static void createAccount(Mirror mirror, String userToken, String accountName,
String authTokenType, String authToken) {
try {
Account account = new Account();
List<AuthToken> authTokens = Lists.newArrayList(
new AuthToken().setType(authTokenType).setAuthToken(authToken));
account.setAuthTokens(authTokens);
mirror.accounts().insert(
userToken, ACCOUNT_TYPE, accountName, account).execute();
} catch (IOException e) {
e.printStackTrace();
}
please help me ...
Here are the parameters origin:
userToken
you get from MyGlass when the user clicks on the auth URL: if you don't get it, let the review team know so that they can fix whatever is missing in the backend. Make sure to specify that you want to use GDK auth.accountName
is up to you: this is the name of the user account you are inserting.authTokenType
is also up to you but need to exactly match what you provided the review team with.authToken
is the token generated by your service: again, this is the token you are inserting for the user.