Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple service creation from MobileCore #67

Merged
merged 2 commits into from
Aug 14, 2018
Merged

Decouple service creation from MobileCore #67

merged 2 commits into from
Aug 14, 2018

Conversation

danielpassos
Copy link
Collaborator

Related issues:

PS: This PR depends on aerogear/aerogear-android-sdk#269

@@ -70,7 +70,7 @@ OpenIDAuthenticationProvider provideAuthProvider(KeycloakAuthenticateProviderImp
// tag::securityServiceInit[]
@Provides @Singleton
SecurityService provideSecurityService() {
return MobileCore.getInstance().getService(SecurityService.class);
return new SecurityService();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Cleaner and shows easier to be used.

@danielpassos
Copy link
Collaborator Author

@secondsun @wei-lee Wanna review before I move forward?

@danielpassos danielpassos mentioned this pull request Aug 14, 2018
2 tasks
Copy link
Member

@ziccardi ziccardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a very minor comment.

LGTM

AuthServiceConfiguration authServiceConfig = new AuthServiceConfiguration.AuthConfigurationBuilder()
.withRedirectUri("com.aerogear.androidshowcase:/callback")
.build();

authService.init(context, authServiceConfig);
AuthService authService = new AuthService(authServiceConfig);
return authService;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be changed to return new AuthService(authServiceConfig);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@danielpassos danielpassos merged commit 727dc10 into aerogear:master Aug 14, 2018
@danielpassos danielpassos deleted the AEROGEAR-3088 branch August 14, 2018 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants