<commit_before># DAT250-auction
Java EE Auction web application, a part of the course DAT250 (Advanced Software Technologies) at Western Norway University of Applied Sciences ([HVL](https://www.hvl.no/))

## Functionality
* Creating auctions
* Managing auctions
* Biding on auctions
* Secure communication with TLS
* Authentication/login

## Users
There is only one type of user (role) in the project as per now;
AuctionUser

Create users with the guide in [Login](#Login)

## Setup and installation
Start Glassfish-server version >= 4.1.2  
Add the file glassfish-resources to the webserver:

```./asadmin add-resources .../DAT250-auction/web/WEB-INF/glassfish-resources.xml```

Build the project in NetBeans, and deploy to server.
The project is then accessable at the adress:
[localhost:8181/DAT250-auction/](https://localhost:8181/DAT250-auction/)

### Login
The login is configured to use the security-realm 'file' in the Glassfish-server.
From the Glassfish control-panel  
**Configurations -> server-config -> security** enable *Default Principal To Role Mapping*.  
**Configurations -> server-config -> security -> Realms -> file** press *manage users*.   Add a user (ie. admin) and place it in the 'Grup list' **AuctionUser**



## Authors
The project is created by [<NAME>](https://github.com/JosteinKringlen), [<NAME>](https://github.com/Kristianrosland), [<NAME>](https://github.com/AndreDyrstad) and [<NAME>](https://github.com/diddern).<commit_msg>Changes to readme to reflect new changes in login.<commit_after># DAT250-auction
Java EE Auction web application, a part of the course DAT250 (Advanced Software Technologies) at Western Norway University of Applied Sciences ([HVL](https://www.hvl.no/))

## Functionality
* Creating auctions
* Managing auctions
* Biding on auctions
* Secure communication with TLS
* Authentication/login

## Users
There is only one type of user (role) in the project as per now;
AuctionUser

Create users with the guide in [Login](#Login)

## Setup and installation
Start Glassfish-server version >= 4.1.2  
Add the file glassfish-resources to the webserver:

```./asadmin add-resources DAT250-auction/src/main/webapp/WEB-INF/glassfish-resources.xml```

NB!
You might have to configure jdcbRealm under server-config -> security -> Realms and press "new" and name it jdbc-realm.  
Class Name: com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm  
JAAS Context: jdbcRealm  
JNDI: jdbc/securityDatasource  
User Table: public.users  
User Name Column: username  
Password Column: password  
Group table: public.groups  
Group name Column: groupname  
Password Encryption Algorithm: AES  
Charset: UTF-8  

Then go to server-config -> security and set Default realm to jnbc-realm and enable Default Principal To Role Mapping 

Build the project in NetBeans, and deploy to server.
The project is then accessable at the adress:
[localhost:8181/DAT250-auction/](https://localhost:8181/DAT250-auction/)

### Login
The login is configured to use the security-realm 'file' in the Glassfish-server.
From the Glassfish control-panel  
**Configurations -> server-config -> security** enable *Default Principal To Role Mapping*.  
**Configurations -> server-config -> security -> Realms -> file** press *manage users*.   Add a user (ie. admin) and place it in the 'Grup list' **AuctionUser**

## Authors
The project is created by [<NAME>](https://github.com/JosteinKringlen), [<NAME>](https://github.com/Kristianrosland), [<NAME>](https://github.com/AndreDyrstad) and [<NAME>](https://github.com/diddern).
{'fraction_non_alphanumeric': 0.11136235161107971, 'fraction_numerical': 0.014980214810627474, 'mean_word_length': 4.65335463258786, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 28, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1102705', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1020, 'n_words': 380}