Once you have the AuthCodeApp imported to Android Studio, perform the following steps to add support for dynamic client registration:
- As the application has to handle it's own registration, create the sub-package client/registration.
- Then, within the registration package, create the following class to represent client credentials (which is clientId and clientSecret). Don't forget to create the respective getters and setters for each attribute:
public class ClientCredentials { private String clientId; private String clientSecret; // getters and setters omitted for brevity}
- Now, to store an instance of ClientCredentials in memory, create the class ClientCredentialsStore which will be a singleton instance as presented in the ...