Merge pull request #805 from stianst/master

Fixes
This commit is contained in:
Stian Thorgersen 2014-10-28 20:14:55 +01:00
commit ca96c071e8
13 changed files with 37 additions and 35 deletions

View file

@ -40,9 +40,9 @@ public enum EventType {
SEND_VERIFY_EMAIL_ERROR, SEND_VERIFY_EMAIL_ERROR,
SEND_RESET_PASSWORD, SEND_RESET_PASSWORD,
SEND_RESET_PASSWORD_ERROR, SEND_RESET_PASSWORD_ERROR,
SOCIAL_LOGIN,
SOCIAL_LOGIN_ERROR,
INVALID_SIGNATURE_ERROR, INVALID_SIGNATURE_ERROR,
REGISTER_NODE, REGISTER_NODE,
UNREGISTER_NODE UNREGISTER_NODE
} }

View file

@ -1,4 +1,4 @@
authenticatorCode=One-time-password authenticatorCode=One-time code
email=Email email=Email
errorHeader=Error! errorHeader=Error!
firstName=First name firstName=First name
@ -23,8 +23,8 @@ invalidTotp=Invalid authenticator code
readOnlyUser=You can't update your account as it is read only readOnlyUser=You can't update your account as it is read only
readOnlyPassword=You can't update your password as your account is read only readOnlyPassword=You can't update your password as your account is read only
successTotp=Google authenticator configured. successTotp=Mobile authenticator configured.
successTotpRemoved=Google authenticator removed. successTotpRemoved=Mobile authenticator removed.
accountUpdated=Your account has been updated accountUpdated=Your account has been updated
accountPasswordUpdated=Your password has been updated accountPasswordUpdated=Your password has been updated

View file

@ -12,25 +12,32 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class="provider"><span class="social googleplus">FreeOTP</span></td> <td class="provider">Mobile</td>
<td class="action"> <td class="action">
<a id="remove-google" href="${url.totpRemoveUrl}"><i class="pficon pficon-delete"></i></a> <a id="remove-mobile" href="${url.totpRemoveUrl}"><i class="pficon pficon-delete"></i></a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<#else> <#else>
<h2>Google Authenticator Setup</h2> <h2>Authenticator</h2>
<hr/> <hr/>
<ol> <ol>
<li>Download the <a href="https://fedorahosted.org/freeotp/" target="_blank">FreeOTP app</a> in your device.</li> <li>
<li>Create an account in FreeOTP and scan the barcode or type in the provided key below.<br/> Install <a href="https://fedorahosted.org/freeotp/" target="_blank">FreeOTP</a> or
<a href="http://code.google.com/p/google-authenticator/" target="_blank">Google Authenticator</a>
on your mobile
</li>
<li>
Open the application and scan the barcode or enter the key<br/>
<img src="${totp.totpSecretQrCodeUrl}" alt="Figure: Barcode"><br/> <img src="${totp.totpSecretQrCodeUrl}" alt="Figure: Barcode"><br/>
<span class="code">${totp.totpSecretEncoded}</span> <span class="code">${totp.totpSecretEncoded}</span>
</li> </li>
<li>Enter the one-time-password provided by FreeOTP below and click Submit to finish the setup.</li> <li>
Enter the one-time code provided by the application and click Submit to finish the setup.
</li>
</ol> </ol>
<hr/> <hr/>

View file

@ -1,8 +1,5 @@
<div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div> <div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div>
<div id="content-area" class="col-md-9" role="main"> <div id="content-area" class="col-md-9" role="main">
<ul class="nav nav-tabs nav-tabs-pf">
<li class="active"><a href="">Application List</a></li>
</ul>
<h2></h2> <h2></h2>
<div id="content"> <div id="content">
<h2><span>{{realm.realm}}</span> Applications <span tooltip-placement="right" tooltip="Applications are trusted browser apps and web services in a realm. These applications can request a login. You can also define application specific roles." class="fa fa-info-circle"></span></h2> <h2><span>{{realm.realm}}</span> Applications <span tooltip-placement="right" tooltip="Applications are trusted browser apps and web services in a realm. These applications can request a login. You can also define application specific roles." class="fa fa-info-circle"></span></h2>

View file

@ -1,8 +1,5 @@
<div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div> <div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div>
<div id="content-area" class="col-md-9" role="main"> <div id="content-area" class="col-md-9" role="main">
<ul class="nav nav-tabs nav-tabs-pf">
<li class="active"><a href="">OAuth List</a></li>
</ul>
<h2></h2> <h2></h2>
<div id="content"> <div id="content">
<h2><span>{{realm.realm}}</span> OAuth Clients <span tooltip-placement="right" tooltip="OAuth clients are like applicatoins, but are only granted temporary access. In browser apps, users will be queried to explicitly grant access." class="fa fa-info-circle"></span></h2> <h2><span>{{realm.realm}}</span> OAuth Clients <span tooltip-placement="right" tooltip="OAuth clients are like applicatoins, but are only granted temporary access. In browser apps, users will be queried to explicitly grant access." class="fa fa-info-circle"></span></h2>

View file

@ -1,4 +1,4 @@
<ul class="nav nav-tabs nav-tabs-pf" data-ng-show="!create"> <ul class="nav nav-tabs nav-tabs-pf" data-ng-hide="create && !path[4]">
<li ng-class="{active: !path[4]}"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li> <li ng-class="{active: !path[4]}"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
<li ng-class="{active: path[4] == 'credentials'}" data-ng-show="!application.publicClient && application.protocol != 'saml'"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li> <li ng-class="{active: path[4] == 'credentials'}" data-ng-show="!application.publicClient && application.protocol != 'saml'"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
<li ng-class="{active: path[4] == 'saml'}" data-ng-show="application.protocol == 'saml' && (application.attributes['saml.client.signature'] == 'true' || application.attributes['saml.encrypt'] == 'true')"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/saml/keys">SAML Keys</a></li> <li ng-class="{active: path[4] == 'saml'}" data-ng-show="application.protocol == 'saml' && (application.attributes['saml.client.signature'] == 'true' || application.attributes['saml.encrypt'] == 'true')"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/saml/keys">SAML Keys</a></li>

View file

@ -30,13 +30,16 @@
<#elseif section = "info" > <#elseif section = "info" >
<ol id="kc-totp-settings"> <ol id="kc-totp-settings">
<li> <li>
<p>${rb.loginTotpStep1_1} <a href="https://fedorahosted.org/freeotp/" target="_blank">${rb.loginTotpStep1_2}</a> ${rb.loginTotpStep1_3}</p> <p>${rb.loginTotpStep1}</p>
</li> </li>
<li> <li>
<p>${rb.loginTotpStep2}</p> <p>${rb.loginTotpStep2}</p>
<img src="${totp.totpSecretQrCodeUrl}" alt="Figure: Barcode"><br/> <img src="${totp.totpSecretQrCodeUrl}" alt="Figure: Barcode"><br/>
<span class="code">${totp.totpSecretEncoded}</span> <span class="code">${totp.totpSecretEncoded}</span>
</li> </li>
<li>
<p>${rb.loginTotpStep3}</p>
</li>
</ol> </ol>
</#if> </#if>
</@layout.registrationLayout> </@layout.registrationLayout>

View file

@ -26,7 +26,7 @@ submit=Submit
yes=Yes yes=Yes
no=No no=No
authenticatorCode=One-time-password authenticatorCode=One-time code
clientCertificate=Client Certificate clientCertificate=Client Certificate
invalidUser=Invalid username or password. invalidUser=Invalid username or password.
@ -47,8 +47,8 @@ invalidPasswordExisting=Invalid existing password
invalidPasswordConfirm=Password confirmation doesn't match invalidPasswordConfirm=Password confirmation doesn't match
invalidTotp=Invalid authenticator code invalidTotp=Invalid authenticator code
successTotp=FreeOTP authenticator configured. successTotp=Mobile authenticator configured.
successTotpRemoved=FreeOTP authenticator removed. successTotpRemoved=Mobile authenticator removed.
usernameExists=Username already exists usernameExists=Username already exists
emailExists=Email already exists emailExists=Email already exists
@ -60,13 +60,11 @@ loginOauthTitle=Temporary access.
loginOauthTitleHtml=Temporary access requested. Login to grant access. loginOauthTitleHtml=Temporary access requested. Login to grant access.
loginForgot=Forgot loginForgot=Forgot
loginTotpTitle=FreeOTP Authenticator Setup loginTotpTitle=Mobile Authenticator Setup
loginTotpStep1_1=Download the loginTotpStep1=Install <a href="https://fedorahosted.org/freeotp/" target="_blank">FreeOTP</a> or <a href="http://code.google.com/p/google-authenticator/" target="_blank">Google Authenticator</a> on your mobile
loginTotpStep1_2=FreeOTP Authenticator app loginTotpStep2=Open the application and scan the barcode or enter the key
loginTotpStep1_3=in your device. loginTotpStep3=Enter the one-time code provided by the application and click Submit to finish the setup
loginTotpStep2=Create an account in FreeOTP and scan the barcode or type in the provided key below. loginTotpOneTime=One-time code
loginTotpStep3=Enter the one-time-password provided by FreeOTP below and click Submit to finish the setup.
loginTotpOneTime=One-time-password
loginProfileTitle=Update Account Information loginProfileTitle=Update Account Information
loginProfileWarning=Your account is not enabled because you need to update your account information. loginProfileWarning=Your account is not enabled because you need to update your account information.
@ -91,7 +89,7 @@ errorTitle=We're sorry...
errorTitleHtml=We're <strong>sorry</strong> ... errorTitleHtml=We're <strong>sorry</strong> ...
errorGenericMsg=Something happened and we could not process your request. errorGenericMsg=Something happened and we could not process your request.
actionWarningHeader=Your account is not enabled. actionWarningHeader=Your account is not enabled.
actionTotpWarning=You need to set up the FreeOTP Authenticator to activate your account. actionTotpWarning=You need to set up Mobile Authenticator to activate your account.
actionProfileWarning=You need to update your user profile to activate your account. actionProfileWarning=You need to update your user profile to activate your account.
actionPasswordWarning=You need to change your password to activate your account. actionPasswordWarning=You need to change your password to activate your account.
actionEmailWarning=You need to verify your email address to activate your account. actionEmailWarning=You need to verify your email address to activate your account.

View file

@ -121,7 +121,7 @@ public class SocialResource {
RealmModel realm = clientSession.getRealm(); RealmModel realm = clientSession.getRealm();
EventBuilder event = new EventsManager(realm, session, clientConnection).createEventBuilder() EventBuilder event = new EventsManager(realm, session, clientConnection).createEventBuilder()
.event(EventType.SOCIAL_LOGIN) .event(EventType.LOGIN)
.client(clientSession.getClient()) .client(clientSession.getClient())
.detail(Details.REDIRECT_URI, clientSession.getRedirectUri()) .detail(Details.REDIRECT_URI, clientSession.getRedirectUri())
.detail(Details.AUTH_METHOD, authMethod); .detail(Details.AUTH_METHOD, authMethod);

View file

@ -125,7 +125,7 @@ public class AssertEvents implements TestRule, EventListenerProviderFactory {
} }
public ExpectedEvent expectSocialLogin() { public ExpectedEvent expectSocialLogin() {
return expect(EventType.SOCIAL_LOGIN) return expect(EventType.LOGIN)
.detail(Details.CODE_ID, isCodeId()) .detail(Details.CODE_ID, isCodeId())
.detail(Details.USERNAME, DEFAULT_USERNAME) .detail(Details.USERNAME, DEFAULT_USERNAME)
.detail(Details.AUTH_METHOD, "form") .detail(Details.AUTH_METHOD, "form")

View file

@ -348,7 +348,7 @@ public class AccountTest {
totpPage.configure(totp.generate(totpPage.getTotpSecret())); totpPage.configure(totp.generate(totpPage.getTotpSecret()));
Assert.assertEquals("Google authenticator configured.", profilePage.getSuccess()); Assert.assertEquals("Mobile authenticator configured.", profilePage.getSuccess());
events.expectAccount(EventType.UPDATE_TOTP).assertEvent(); events.expectAccount(EventType.UPDATE_TOTP).assertEvent();

View file

@ -44,7 +44,7 @@ public class AccountTotpPage extends AbstractAccountPage {
@FindBy(css = "button[type=\"submit\"]") @FindBy(css = "button[type=\"submit\"]")
private WebElement submitButton; private WebElement submitButton;
@FindBy(id = "remove-google") @FindBy(id = "remove-mobile")
private WebElement removeLink; private WebElement removeLink;
public void configure(String totp) { public void configure(String totp) {

View file

@ -48,7 +48,7 @@ public class LoginConfigTotpPage extends AbstractPage {
} }
public boolean isCurrent() { public boolean isCurrent() {
return driver.getTitle().equals("FreeOTP Authenticator Setup"); return driver.getTitle().equals("Mobile Authenticator Setup");
} }
public void open() { public void open() {