2 Commits

Author SHA1 Message Date
  JaseG256 c12c32699b Before merge 6 years ago
  JaseG256 f330628bee Cleaned up SecurityConfig 6 years ago

BIN
.DS_Store View File


+ 1
- 1
ZipTeamOrange-ionic-UI/.sourcemaps/main.js.map
File diff suppressed because it is too large
View File


+ 1
- 2
ZipTeamOrange-ionic-UI/www/build/main.js View File

123
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
123
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
124
             selector: 'page-first',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/'<!--\n  Generated template for the FirstPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n  <ion-navbar color="primary">\n    <button menuToggle ion- button icon-only>\n      <ion-icon name ="menu"></ion-icon>\n    </button>\n    <ion-title text-center>ZipTeamOrange</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <h4>Welcome to this page</h4>\n  <div class="login-box">\n    <form #registerForm="ngForm" ng-submit="loginButton(registerForm.value)" >\n      <ion-row>\n        <ion-col>\n          <ion-list inset>\n            <ion-item>\n              <ion-input type="text" placeholder="Username" name="userName" required [(ngModel)]="Username" ></ion-input>\n            </ion-item>\n            <ion-item>\n              <ion-input type="password" placeholder="Password" name="password" required [(ngModel)]="password"></ion-input>\n            </ion-item>\n          </ion-list>\n        </ion-col>\n      </ion-row>\n      <ion-row>\n        <ion-col class="signup-col">\n          <button ion-button class="submit-btn" full type="submit" [disabled]="!registerForm.form.valid" (click)="loginButton(registerForm.value)">Login</button>\n        </ion-col>\n      </ion-row>\n    </form>\n    <ion-row>\n      <ion-col color="secondary">\n        <button ion-button class="register-btn" block clear (click)="createAccount()">Create Account</button>\n      </ion-col>\n    </ion-row>\n  </div>\n  \n</ion-content>'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/,
124
             selector: 'page-first',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/'<!--\n  Generated template for the FirstPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n  <ion-navbar color="primary">\n    <button menuToggle ion- button icon-only>\n      <ion-icon name ="menu"></ion-icon>\n    </button>\n    <ion-title text-center>ZipTeamOrange</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <h4>Welcome to this page</h4>\n  <div class="login-box">\n    <form #registerForm="ngForm" ng-submit="loginButton(registerForm.value)" >\n      <ion-row>\n        <ion-col>\n          <ion-list inset>\n            <ion-item>\n              <ion-input type="text" placeholder="Username" name="userName" required [(ngModel)]="Username" ></ion-input>\n            </ion-item>\n            <ion-item>\n              <ion-input type="password" placeholder="Password" name="password" required [(ngModel)]="password"></ion-input>\n            </ion-item>\n          </ion-list>\n        </ion-col>\n      </ion-row>\n      <ion-row>\n        <ion-col class="signup-col">\n          <button ion-button class="submit-btn" full type="submit" [disabled]="!registerForm.form.valid" (click)="loginButton(registerForm.value)">Login</button>\n        </ion-col>\n      </ion-row>\n    </form>\n    <ion-row>\n      <ion-col color="secondary">\n        <button ion-button class="register-btn" block clear (click)="createAccount()">Create Account</button>\n      </ion-col>\n    </ion-row>\n  </div>\n  \n</ion-content>'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/,
125
         }),
125
         }),
126
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]) === "function" && _b || Object, typeof (_c = typeof __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */]) === "function" && _c || Object])
126
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */], __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */]])
127
     ], FirstPage);
127
     ], FirstPage);
128
     return FirstPage;
128
     return FirstPage;
129
-    var _a, _b, _c;
130
 }());
129
 }());
131
 
130
 
132
 //# sourceMappingURL=first.js.map
131
 //# sourceMappingURL=first.js.map

+ 1
- 1
ZipTeamOrange-ionic-UI/www/build/main.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
ZipTeamOrange-ionic-UI/www/build/vendor.js.map
File diff suppressed because it is too large
View File


BIN
ZipTeamOrange-server/src/main/java/ZipTeamOrange/.DS_Store View File


+ 1
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Config/SecurityConfig.java View File

27
         prePostEnabled = true
27
         prePostEnabled = true
28
 )
28
 )
29
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
29
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
30
+
30
     @Autowired
31
     @Autowired
31
     CustomUserDetailsService customUserDetailsService;
32
     CustomUserDetailsService customUserDetailsService;
32
 
33
 

+ 1
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Controller/UserController.java View File

10
 import java.util.Optional;
10
 import java.util.Optional;
11
 
11
 
12
 @RestController
12
 @RestController
13
+@CrossOrigin("http://localhost:8100")
13
 @RequestMapping(path = "/user")
14
 @RequestMapping(path = "/user")
14
 public class UserController {
15
 public class UserController {
15
 
16
 

+ 5
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Model/Message.java View File

72
     public void setChat(Chat chat) {
72
     public void setChat(Chat chat) {
73
         this.chat = chat;
73
         this.chat = chat;
74
     }
74
     }
75
+
76
+    @Override
77
+    public String toString() {
78
+        return createdDate + " " + createdBy + " " + text;
79
+    }
75
 }
80
 }

+ 1
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Repository/UserRepository.java View File

10
 
10
 
11
 @Repository
11
 @Repository
12
 public interface UserRepository extends JpaRepository<User, Long> {
12
 public interface UserRepository extends JpaRepository<User, Long> {
13
+
13
     Optional<User> findByEmail(String email);
14
     Optional<User> findByEmail(String email);
14
 
15
 
15
     Optional<User> findByUsernameOrEmail(String username, String email);
16
     Optional<User> findByUsernameOrEmail(String username, String email);

+ 1
- 1
ZipTeamOrange-server/src/main/java/ZipTeamOrange/config/WebMvcConfig.java View File

12
     @Override
12
     @Override
13
     public void addCorsMappings(CorsRegistry registry) {
13
     public void addCorsMappings(CorsRegistry registry) {
14
         registry.addMapping("/**")
14
         registry.addMapping("/**")
15
-                .allowedOrigins("*")
15
+                .allowedOrigins("*", "")
16
                 .allowedMethods("HEAD", "OPTIONS", "GET", "POST", "PUT", "PATCH", "DELETE")
16
                 .allowedMethods("HEAD", "OPTIONS", "GET", "POST", "PUT", "PATCH", "DELETE")
17
                 .maxAge(MAX_AGE_SECS);
17
                 .maxAge(MAX_AGE_SECS);
18
     }
18
     }