Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement login form for external application #153

Closed
ernado-x opened this issue Nov 20, 2021 · 0 comments
Closed

Implement login form for external application #153

ernado-x opened this issue Nov 20, 2021 · 0 comments

Comments

@ernado-x
Copy link
Member

ernado-x commented Nov 20, 2021

For providing the ability for users to auth in to external applications by using an ecampus account we need to create a special login form.

This form should support the redirect back to the external application page and pass the authorisation code.

Route for login form: https://ecampus.kpi.ua/login/external

Query parameters which should handle form:

  • redirect_uri
  • appId

For auth user form should make POST request on endpoint: https://ecampus.kpi.ua/oauth/app/authorize
Structure of POST request:

public record ExternalApplicationAuthorizationRequest
{
    [Required] 
    public string Username { get; set; }

    [Required] 
    public string Password { get; set; }
    
    [Required] 
    public string AppId { get; set; }
    
    [Required] 
    public Uri RedirectUrl { get; set; }
}

Screenshot 2021-11-21 at 15 51 15

If form received OK (200) response code from API, then it should redirect user back to external app and pass received authorisation code, form should be closed. In case of Forbid (403) response code – error message should be displayed for user.

This task should be implemented together with https://github.com/kpi-ua/api.campus.kpi.ua/issues/23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant