Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .formLogin()
- .loginProcessingUrl("/api/authentication")
- .successHandler(ajaxAuthenticationSuccessHandler)
- .failureHandler(ajaxAuthenticationFailureHandler)
- .usernameParameter("j_username")
- // .passwordParameter("j_password")
- .permitAll()
- function login (credentials) {
- alert("log in this");
- var data = 'j_username=' + encodeURIComponent(credentials.username)
- +
- // '&j_password=' + encodeURIComponent(credentials.password) +
- '&remember-me=' + credentials.rememberMe + '&submit=Login';
- return $http.post('api/authentication', data, {
- headers: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }).success(function (response) {
- return response;
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement