SMART COSMOS RDAO for User Details

REST Controller for hooking into the DAO implementations

License

License

Categories

Categories

Net
GroupId

GroupId

net.smartcosmos
ArtifactId

ArtifactId

smartcosmos-user-details
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

SMART COSMOS RDAO for User Details
REST Controller for hooking into the DAO implementations
Project URL

Project URL

http://smartcosmos.net/smartcosmos-user-details
Project Organization

Project Organization

Smartrac Technology Fletcher, Inc.
Source Code Management

Source Code Management

https://github.com/SMARTRACTECHNOLOGY/smartcosmos-user-details/tree/master/

Download smartcosmos-user-details

How to add to project

<!-- https://jarcasting.com/artifacts/net.smartcosmos/smartcosmos-user-details/ -->
<dependency>
    <groupId>net.smartcosmos</groupId>
    <artifactId>smartcosmos-user-details</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.smartcosmos/smartcosmos-user-details/
implementation 'net.smartcosmos:smartcosmos-user-details:0.0.2'
// https://jarcasting.com/artifacts/net.smartcosmos/smartcosmos-user-details/
implementation ("net.smartcosmos:smartcosmos-user-details:0.0.2")
'net.smartcosmos:smartcosmos-user-details:jar:0.0.2'
<dependency org="net.smartcosmos" name="smartcosmos-user-details" rev="0.0.2">
  <artifact name="smartcosmos-user-details" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.smartcosmos', module='smartcosmos-user-details', version='0.0.2')
)
libraryDependencies += "net.smartcosmos" % "smartcosmos-user-details" % "0.0.2"
[net.smartcosmos/smartcosmos-user-details "0.0.2"]

Dependencies

compile (3)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-annotations jar
net.smartcosmos : smartcosmos-framework jar 3.1.1
org.springframework.security : spring-security-core jar

provided (3)

Group / Artifact Type Version
org.hibernate : hibernate-validator jar
org.projectlombok : lombok jar
org.springframework : spring-web jar

test (8)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar
javax.el : javax.el-api jar 2.2.5
org.json : json jar
com.jayway.jsonpath : json-path jar
com.jayway.jsonpath : json-path-assert jar
junit : junit jar
org.springframework.boot : spring-boot-starter-test jar
org.springframework.security : spring-security-test jar

Project Modules

There are no modules declared in this project.

SMART COSMOS User Details

Build Status

The SMART COSMOS User Details library provides the common /authenticate endpoint used by the Auth Server to retrieve user details for token generation, and also includes the corresponding request and response models.

In addition, it includes a default implementation of AuthenticateUserService which is available via auto-configuration.

REST API

Available methods

JSON Fields

Field Format Default Required Description

name

Username

yes

credentials

User password

yes

API Endpoints

Authenticate - POST /authenticate

Depending on the actual application configuration, this endpoint may require authentication.

POST /authenticate
{
    "name": "[email protected]",
    "credentials": "Passw0rd",
    "details": {
        "grantType": "password",
        "scope": "read",
        "username": "[email protected]"
    },
    "authorities": [],
    "authenticated": false,
    "principal": "[email protected]"
}
Response
200 OK
{
   "authorities" : [
      "https://authorities.smartcosmos.net/things/read"
   ],
   "tenantUrn" : "urn:account:uuid:53f452c2-5a01-44fd-9956-3ecff7c32b30",
   "userUrn" : "urn:user:uuid:53f452c2-5a01-44fd-9956-3ecff7c32b30",
   "name" : "[email protected]",
   "passwordHash" : ""
}
400 Bad Request
{
   "code" : 1,
   "message" : "Invalid username or password"
}
401 Unauthorized
net.smartcosmos

Smart Cosmos Solutions Inc.

Versions

Version
0.0.2
0.0.1