Skip to content

How are you modeling authentication operation? #60

@schatekar

Description

@schatekar

I am currently working on enhancing user service which would be consumed by several other services. Other than offering basic CRUD functionality around users this service is also supposed to act as a SAML enabled id provider and so it needs to be able to authenticate users somehow. The current implementation looks like below

PUT /authenticate

{
Userame: {username},
Passowrd: {password}
}

This returns a true or false depending on success or failure of authentication. I am thinking of changing this to be more RESTful. I am thinking on these lines.

Authentication is a process so there is real resource involved here. Should I define a new virtual resource? What should this resource be? Something that gets created when authentication succeeds? A LoggedInSession? A SecurityContext? SecurityContext sounds better. So let's design the API as below

POST /securitycontext

{
Userame: {username},
Passowrd: {password}
}

Not sure if I am thinking in the right direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions