Commit a25f9ca7 authored by Varun Patil's avatar Varun Patil

Add layout to login page

parent 9daf0245
<html>
<head>
<style>
.logodiv {
width: 45%;
margin: 0 auto;
margin-top: 25%;
text-align: center;
}
.logo {
width: 100%;
}
.app-name {
margin-top: 10px;
font-weight: 200;
font-size: 1.5em;
}
.gap {
height: 35%;
}
.logindiv {
margin: 0 auto;
width: 100%;
text-align: center;
}
a {color: black;}
a:link {color: black;} /* unvisited link */
a:visited {color: black;} /* visited link */
a:hover {color: black;} /* mouse over link */
a:active {color: black;} /* selected link */
.login {
font-size: 1.05em;
padding: 10px 28%;
border-radius: 4px;
background-color: rgb(255, 215, 64);
text-decoration: none;
}
.guest {
text-decoration: none;
font-weight: 200;
line-height: 1.7em;
font-size: 1.05em;
}
</style>
</head>
<body>
<table>
<tr>
<td>
Hello World<br>
<a href="https://gymkhana.iitb.ac.in/sso/account/login/?next=/sso/oauth/authorize/%3Fclient_id%3DvR1pU7wXWyve1rUkg0fMS6StL1Kr6paoSmRIiLXJ%26response_type%3Dcode%26scope%3Dbasic%2520profile%2520picture%2520sex%2520ldap%2520phone%2520insti_address%2520program%2520secondary_emails%26redirect_uri=https://redirecturi">
:LOGIN:
<div class="logodiv">
<img src="lotus.png" class="logo">
<div class="app-name">InstiApp</div>
</div>
<div class="gap"></div>
<div class="logindiv">
<a class="login" href="https://gymkhana.iitb.ac.in/sso/account/login/?next=/sso/oauth/authorize/%3Fclient_id%3DvR1pU7wXWyve1rUkg0fMS6StL1Kr6paoSmRIiLXJ%26response_type%3Dcode%26scope%3Dbasic%2520profile%2520picture%2520sex%2520ldap%2520phone%2520insti_address%2520program%2520secondary_emails%26redirect_uri=https://redirecturi">
LOG IN VIA SSO
</a>
</td>
</tr>
</table>
<br><br>
or
<br>
<a class="guest" href="https://guesturi">
Continue as a Guest
</a>
</div>
</body>
</html>
\ No newline at end of file
......@@ -93,28 +93,6 @@ public class LoginActivity extends AppCompatActivity {
}
};
registerReceiver();
Button ldapLogin = (Button) findViewById(R.id.ldap_login);
ldapLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Log.d(TAG, "Initiating auth");
AuthorizationServiceConfiguration config = new AuthorizationServiceConfiguration(mAuthEndpoint, mTokenEndpoint);
makeAuthRequest(config);
}
});
Button guestLogin = (Button) findViewById(R.id.guest_login);
guestLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//TODO This is for debug purposes, change once SSO is implemented
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(intent);
}
});
}
@Override
......
......@@ -4,25 +4,10 @@
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/guest_login"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center"
android:text="Guest Login" />
<Button
android:id="@+id/ldap_login"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center"
android:text="LDAP login" />
<WebView
android:id="@+id/login_webview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
</WebView>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment